ProxyPass /tomcat/ http://myserver:8080/ ProxyPassReverse /tomcat/ http://myserver:8080/
With the current ProxyPass & ProxyPassReverse configuration they are going to be redirected to the non-ssl URL. How can I setup the proxy pass so that it redirects to different protocol and port based on the incoming request?
That is, if someone comes in via HTTPS how can I redirect them to my tomcat @ https://myserver:8443?
NameVirtualHost *:443 <VirtualHost *:80> ProxyPass /tomcat/ http://myserver:8080/ ProxyPassReverse /tomcat/ http://myserver:8080/ </VirtualHost> <VirtualHost *:443> ProxyPass /tomcat/ https://myserver:8443/ ProxyPassReverse /tomcat/ https://myserver:8443/ </VirtualHost>
Now when I visit: https://myserver/tomcat/ I get "page not found". In the error log I see "File does not exist: /var/apache2/htdocs/tomcat"
Which is correct, but I expected the request to be routed to tomcat running at https://myserver:8443/.
Guess I need to look more at the virtual hosts, unless something looks glaringly wrong.