On the Mac, adding the mod_proxy module was as simple as adding a single line to a configuration file. On ubuntu, it’s a lot less obvious.
Here’s what you need to do
1) Install the modules:
sudo apt-get install libapache2-mod-proxy-html apt-get install libxml2-dev
If you get an error with apt-get install, you may need to update the indexes:
Some people say you can just softlink the available modules to the enabled modules, which are located at /etc/apache2/mods-available and /etc/apache2/mods-enabled, respectively.
But I could not find the required modules under the mods-available and I wasn’t sure what other submodules were needed.
2) Supposedly having the softlinks in mods-enabled should load it without having to add “LoadModule” commands into the apache2 configuration, but that is not the case.
For me, the following 3 lines were needed:
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so LoadFile /usr/lib/libxml2.so
In addition, you need to set the reverse proxy urls
ProxyPass /pass/ http://localhost:8080/
Where do you put this? Well, there are several places. Here’s a full list.
I decided to put it in /etc/apache2/httpd.conf