Proxying with Apache2 (running NodeJS apps through Apache)

Ubuntu 14.04 provided modapache2_mod_proxy_html as an option to pass requests to Apache through to something like NodeJS running on a different port. However, this package does not exist for 16.04!

That’s okay, though. Because it’s already there. You just need to enable it.

sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod proxy_html

Then restart the service.

sudo service apache2 restart

Voila! Enable and go, no install required!