0

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.

1 Answer 1

0

The proxied systems are unaware of the SSL proxy, so http URLs need to be rewritten to https.

RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} 

Jira and Confluence support this pattern.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.