We've been running the
section of code below for some while to proxy to an exchange server behind the
wall. The problem recently has been SSL. For a variety of reasons we
have SSL and non SSL connections. After implementing the SSL cert on the
servers we ran into a problem with the return data being http as opossed to
https. This makes sense because of the proxy config. The question
now is can we do both SSL and non-SSL on a proxy request?
Below is the config file. Also,
neither rewrites seem to work. Is there anything that I'm doing obviously
wrong?
RewriteEngine on
RewriteRule ^/~/[Ee]xchange /exchange/ [R]
# This doesn't seem to work either
#RewriteRule ^/~/exchange/i /exchange/ [R]
ProxyRequests Off
ProxyPreserveHost On
ProxyPass /exchange http://10.41.63.12/exchange
ProxyPassReverse /exchange http://10.41.63.12/exchange
ProxyPass /exchweb http://10.41.63.12/exchweb
ProxyPassReverse /exchweb http://10.41.63.12/exchweb
ProxyPass /public http://10.41.63.12/public
ProxyPassReverse /public http://10.41.63.12/public
From: Gary W. Smith
[mailto:gary@xxxxxxxxxxxxxxx]
Sent: Mon 6/13/2005 2:39
PM
To: users@xxxxxxxxxxxxxxxx;
users@xxxxxxxxxxxxxxxx
Subject: RE: [users@httpd] Rewrite / reverse
proxy question
This will work just
fine. Thanks. I would redirect / to Exchange normally but it
actually sends them somewhere else right now.
Gary
From: Axel-Stéphane SMORGRAV
[mailto:Axel-Stephane.SMORGRAV@xxxxxxxxxxxxxx]
Sent: Mon 6/13/2005
12:49 AM
To: users@xxxxxxxxxxxxxxxx
Subject: RE:
[users@httpd] Rewrite / reverse proxy question
What
about this:
If the
URL does not start by /[Ee]xchange the user is redirected to /Exchange... I also
suggest that if the user requests the root path /, he gets redirected to
/Exchange
RewriteRule ^/$ /Exchange [R]
RewriteCond $1 !^/[Ee]xchange
RewriteRule (.*) /Exchange [R]
The above rules imply
that the only path accessible through the reverse proxy will be one prefixed
with /Exchange.
-ascs
Hello,
We are using reverse proxy an exchange server
behind the firewall. So far everything works fine but I wanted to put a
rewrite script in place in the event they users don't type /Exchange/ and do
something like /exchange (missing case and backslash). Can anyone
assist on creating the rewrite rule for this?
Thanks,
Gary Smith