Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: HTTPS problems running Tomcat behind Apache 2.2.4 AJP |
|
Author |
|
bill_bailey
Joined: 02 Feb 2007 Posts: 1
|
Posted: Fri 02 Feb '07 21:36 Post subject: HTTPS problems running Tomcat behind Apache 2.2.4 AJP |
|
|
I have a Struts based application running in Tomcat 5.5.X which I have configured to be accessible through Apache HTTPD 2.2.4 with SSL. The Tomcat instance is also listening on 127.0.0.1:8888, but all access from the internet comes through Apache HTTPD.
I configured a virtual host in Tomcat, an AJP connector on Tomcat port 8009, and a virtual host in Apache HTTPD on port 80. I have the Apache virtual host set up to pass all requests to that host to Tomcat using AJP.
For example:
ProxyPass / ajp://ipaddress:8009/
ProxyPassReverse / ajp://ipaddress:8009/
Everything works fine with my configuration using HTTP which was fine for testing, but now that I'm going to production, I want to use HTTPS.
I set up SSL on Apache and it seems to be working. So I created a new SSL virtual host, replacing the one on port 80 with a new one on port 443 (note, Apache is still listening on port 80 as well, but it only serves local files; there is no virtual host configured for port 80). But when I go to the same URL replacing http: with https:, it doesn't work.
I've also tried using mod_proxy_http to forward the requests on 8888, but had only slightly better results that way. Some of the pages worked, but most did not.
In both cases, I notices some things that I found interesting. The URL in the Tomcat debug log files still displays as http://myvirtualhost/... even though the original request was https: ... this made me wonder if Tomcat not knowing this could cause issues with redirects and the like. I also saw entries a couple of times in the Apache access.log that suggested some of the failed pages were being handled by the default host on port 80 ... I was seeing things like E:\Apache2\htdocs\pages not found (where pages is part of my application's URL in tomcat).
Any ideas on what I might be missing? Any recommendations on how to set up Apache fronting Tomcat with SSL configured on Apache only? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Sun 15 Apr '07 14:15 Post subject: |
|
|
for SSL you need to load proxy_connect_module
LoadModule proxy_connect_module modules/mod_proxy_connect.so |
|
Back to top |
|
|
|
|
|
|