I'm running a tomcat
webserver on port 8080
behind a apache2
, and want to redirect some ports.
For testing, I'm trying to redirect to an invalid location, as follows:
<VirtualHost *:80>
ProxyPreserveHost On
RequestHeader set X-Forwarded-Proto "http"
ProxyPass / http://127.0.0.1/test80
ProxyPassReverse / http://127.0.0.1/test80
</VirtualHost>
<VirtualHost *:8080>
ProxyPreserveHost On
RequestHeader set X-Forwarded-Proto "http"
ProxyPass / http://127.0.0.1/test8080
ProxyPassReverse / http://127.0.0.1/test8080
</VirtualHost>
Result:
The :80
redirect works as expected.
BUT accessing :8080
shows the tomcat manager starting page, instead of the redirect. Why?
Somehow it seems as if the apache2
could not take control of that port?