Security – Hide Original URL using mod_proxy

apache-2.4httpdSecuritytomcaturl

I have been successfully able to use ProxyPass and ProxyPassReverse to reverse-proxy an application running under a Tomcat Server.

However, the challenge is that I want to use a fake URL, to obfuscate completely the path of the original application.

Let's say that my Apache Server is listening to port 9999, and the internal path of the original application is 192.168.1.55:8080/myapp.

Currently, I use ApacheIP:9999/myapp and it works just fine.

When I try to use a fake "alias", for example from myapp to business, Apache returns an HTTP error code (404).

Here's a very short extract of my httpd.conf:

ProxyPass /myapp http://192.168.1.55:8080/myapp Keepalive=On timeout=600

ProxyPassReverse /myapp http://192.168.1.55:8080/myapp

Best Answer

You need to change only the apache part of your rules :

ProxyPass /business http://192.168.1.55:8080/myapp
ProxyPassReverse /business http://192.168.1.55:8080/myapp
Related Topic