I'm struggling to get my Apache config right. I'd like to terminate the SSL connection on Apache and proxy to the http servers on localhost.
The setup is browser --> Apache (HTTPS) --> localhost:8001 --> localhost:8002
The reverse proxy has been setup to use the context in the URL e.g. http://url/test1
will redirect to localhost:8001/test1
I keep getting redirected back to the http port. Fixing up the protocol to https loads the page, but if I get redirected I end up back on http and not https.
<VirtualHost *:443> SSLCACertificateFile /etc/XXX SSLCertificateFile /etc/XXX SSLCertificateKeyFile /etc/XXX SSLProxyEngine On ServerName url <Proxy *> Order deny,allow Allow from all </Proxy> ProxyRequests Off ProxyPreserveHost On ProxyPass /test1 http://localhost:8001/test1 ProxyPassReverse /test1 http://localhost:8001/test1 ProxyPass /test2 http://localhost:8002/test2 ProxyPassReverse /test2 http://localhost:8002/test2 </VirtualHost>
My config works for non SSL connections to Apache though.