Setting up a Reverse Proxy on Apache web server

The steps required to establish the reverse proxy are as follows. First, edit the httpd.conf file available in the Apache installation location e.g.:

<apache_install>\Apache2.4\conf

Load the two modules listed below by uncommenting the following two lines in the httpd.conf file:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

At the end of the httpd.conf file add the reverse proxy configuration as follows - adapt the following examples to your own environment. The ProxyPass option allows you to indicate the application server URLs you want to make available to Apache, and the ProxyPassReverse option ensures that redirects are handled correctly:

ProxyPass /dashboard http://application_server:8080/dashboard
ProxyPass /manager http://application_server:8080/manager/html
.......
ProxyPassReverse / http://application_server:8080/

Save the httpd.conf file and then restart Apache. Now when you enter the http://apache_server/dashboard the request will be redirected to http://application_server:8080/dashboard