I have a web application running inside Tomcat at http://<server>:8080/app/portal/ . I want the world to see this application through the URL http://<server>/portal/ .
To do this, I configured a reverse proxy with Apache 2.2. According to the documentation for ProxyPass , I expect the reverse proxy to transparently forward all requests. My browser should never know the Tomcat URL.
Here is my configuration:
There are no virtual hosts, I added these lines to my httpd.conf
<Location /portal/> AllowOverride All RewriteEngine On ProxyPass http://server:8080/app/portal/ ProxyPassReverse http://server:8080/app/portal/ </Location>
When I use Firefox to open http://<server>/portal/ , I get 302 Moved Temporarily, and all subsequent calls go directly from my browser to http://<server>:8080/app/portal/ . My browser points to this URL.
This is not what I expected from a reverse proxy. Did I misconfigure, or did I misunderstand the purpose of reverse proxies? What should I do to achieve the desired behavior?
Matthias kempka
source share