I have a grails application running on tomcat and I'm using mod_proxy to connect http server with it. My goal is to secure the login process.
My VirtualHost configuration to force https is:
ProxyPass /myapp/ http://127.0.0.1:8080/myapp
ProxyPassReverse /myapp/ http://127.0.0.1:8080/myapp
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(myapp/login) https://%{HTTP_HOST}:443/$1 [NC,R=301,L]
When I go to https://mydomain.com/myapp/adm - which requires authentication - it redirects to http://mydomain.com/myapp/login/auth;jsessionid=yyyyyy, with no security so the rewrite is not working (if I manually replace http with https, it works fine).
Any hints?