Search code examples
apachetomcatreverse-proxyproxypass

Apache Reverse Proxy Configuration Changes


Need some help with Apache Proxy configuration. My application is available at 8080 at below path. http://localhost:8080/HotelOperations

My current configuration is set as below.

ProxyPass        / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/

With this configuration I am able to access my application at port 80, however, I have to pass /HotelOperations to it. I want to be able to access it without /HotelOperations.

Accessible at http://localhost/HotelOperations Desirable at http://localhost

Any help please.


Solution

  • You don't want to re-write URLs. It's miserable. You have to parse and re-write every HTTP header and every document to do the replacement.

    Best to change your application's context path from /HotelOperations to / by re-naming the context to ROOT.