We have setup Apache as ssl frontend for plain http jboss(tomcat)
<VirtualHost *:5555>
ServerName my.server.com
SSLEngine on
SSLCertificateFile /x.crt
SSLCertificateKeyFile /x.pem
SSLProxyEngine on
...
...
ProxyPass / http://my.server:8080/
ProxyPassReverse / http://my.server.com:8080/
</VirtualHost>
In our jsp we have something like this:
<link href="/css/my.css" rel="stylesheet" type="text/css">
When we load the page from
https://my.server.com:5555
The browser telling us this page has unsecure content because the it will load the css from
http://my.server.com:5555/css/my.css
I don't want to use absolute URL in href. Can I somehow tell tomcat to use https from apache without setup ssl in tomcat? Or is the best combination to setup ssl in both Apache & Tomcat?
I have tried the solution as Dirk pointed out but it's still not working.
server.xml
<Connector port="8080" protocol="HTTP/1.1" enableLookups="false" proxyPort="5555" scheme="https" secure="true" />
I still get the error about the unsecure content. Is it because struts 1.1 does not use request.getScheme() or is it because the communication between Apache and Tomcat is with plain http and Apache think
<link href="/css/my.css" rel="stylesheet" type="text/css">
should be download from
http://my.server.com:5555/css/my.css
before sending it back to the browser?
Thx in advance