Setup mod_proxy on apache http server Setup mod_proxy on apache http server apache apache

Setup mod_proxy on apache http server


So it took some time but I figured out the way to do it. There is one more module which needs to be loaded. This is what the httpd.conf looks like

LoadModule proxy_module modules/mod_proxy.soLoadModule proxy_http_module modules/mod_proxy_http.so<Directory />    AllowOverride none    Require all denied</Directory>ProxyPass         /ROOT  http://localhost:8080/ROOTProxyPassReverse  /ROOT  http://localhost:8080/ROOT

This works for sure. :)


Since it's easy to overlook, pay attention to @muka's comment:

sudo a2enmod proxy  sudo a2enmod proxy_http  sudo service apache2 restart

Make sure to enable both modules proxy and proxy_http!


In addition to the other fine answers, if you're proxying to an https endpoint, you need to enable mod_ssl and add SSLProxyEngine on to your vhost