mod_proxy and SSL problem

Fix it!!

mod_proxy and SSL problem

Postby kpc » Fri Oct 30, 2009 3:18 am

Hi all

I wonder if anoyone could shed some light on this problem I'm having.

In my test setup I have 3 servers:

1. Apache - mod_proxy (will be used as Load balancer) set up with SSL details that forward requests
2. Apache - this just has a normal vhost setup to take the SSL requests but forwards all requests to a JBOSS server using mod_proxy_ajp
3. JBOSS server

The JBOSS application works fine however on some pages the https reverts to http - not sure why it does this exactly. In order to get round this issue I've been trying some rewrite rules to force all the non-SSL to SSL but I keep getting stuck in a loop - I'm not too sure if somewhere the proxy is causing all the problems, here's what I've got at the moment, the rules are on the 2nd server:

Code: Select all
Options FollowSymLinks

RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(/descision_tree/.*)$ https://www.domain.com/$1 [NC,L,R]


When I hit part of the application which switches back to port 80 I just get a Redirect Loop error.

many thanks for reading...
kpc
 
Posts: 12
Joined: Tue Nov 18, 2008 12:55 am

Postby kpc » Fri Oct 30, 2009 6:51 am

It's ok - have found a pesky mod_proxy setting that was causing the problem. PreserveProxyHost needs to be off.

Cheers
kpc
 
Posts: 12
Joined: Tue Nov 18, 2008 12:55 am


Return to Security with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 1 guest