I am trying to setup a server with multiple web applications which will all be served through apache VirtualHost (apache running on the same server). My main constrain is that each web application must use SSL encryption. After googling for a while and looking other questions on stackoverflow, I wrote the following configuration for the VirtualHost:
<VirtualHost 22.214.171.124:443> ServerName host.domain.org <Proxy *> Order deny,allow Allow from all </Proxy> SSLProxyEngine On ProxyRequests Off ProxyPreserveHost On ProxyPass / https://localhost:8443/ ProxyPassReverse / https://localhost:8443/ </VirtualHost>
Even though https://host.domain.org:8443 is accessible, https://host.domain.org is not, which defeats the purpose of my virtual host configuration. Firefox complains that even though it successfully connected to the server, the connection was interrupted. I also get the following warning in apache error.log:
proxy: no HTTP 0.9 request (with no host line) on incoming request and preserve host set forcing hostname to be host.domain.org for uri
On the web application (a Tomcat server) the access log shows a strange access request:
"?O^A^C / HTTP/1.1" 302
Following is the correct access resquest I get when I connect directly to https://host.domain.org:8443:
"GET / HTTP/1.1" 302
Finally I should also mention that the virtual host works perfectly fine when I do not use SSL.
How can I make this work ?