This post originated from an RSS feed registered with Agile Buzz
by Dominik Wei-Fieg.
Original Post: Apache, mod_proxy_ajp, Tomcat, SSL
Feed Title: Ars Subtilior
Feed URL: http://typo.ars-subtilior.com/articles.rss
Feed Description: Finest Handmade Code
Random thoughts about agile software development as an art
Just because I had to fight with it today and did not find the solution spelled out elsewhere (I found all parts, but not the definitive answer):
If you have an apache server that uses modproxyajp to proxy requests to tomcat and you want to use https as schema, even when you do redirects, you have to massage the ajp connector settings of tomcats server.xml.
Only when you add the following attributes to the connector, a redirect (for example a Spring RedirectView) will stay in https and not jump to http:
scheme=”https”
secure=”true”
proxyPort=”443”
The scure attribute might not really be necessary, but it did no harm.
This is actually from Robin Johnson, but he did not mention the connector it has to be on.
If you think about it, it’s clear that it has to be the ajp connector, since apache is using that one to talk to tomcat.
Well, took me some nerves to get this into production today, so I thought I mention it, maybe it will help someone else. For me, I hope I won’t have to deal with tomact and jsp anymore…