Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

mod_proxy issue

13 views
Skip to first unread message

worstenbrood

unread,
Nov 18, 2010, 6:48:29 AM11/18/10
to
I'm using Apache 2.2.17 with mod_ssl on a W2K3 machine as proxy to a
non-ssl web server (mongrel).
Everything works fine except when mongrel passes a Location: header to
mod_proxy.
mod_proxy changes the ip/port in the Location: header but doesn't
change http into https.
Is there any way to change the protocol in the Location: header before
passing it to the client ?

Config:

<Virtualhost _default_:8080>

...

SSLProxyEngine on
ProxyRequests Off
ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/

...

</Virtualhost>

worstenbrood

unread,
Nov 18, 2010, 9:20:38 AM11/18/10
to

Ok, i got a bit further by using mod_headers and mod_setenvif, but the
regexp expression seems to be wrong ?

SetEnvIfNoCase Location "^http\:(.*)$" HaveLocationHeader=$1
Header set Location "https:%{HaveLocationHeader}e"
env=HaveLocationHeader
UnsetEnv HaveLocationHeader

worstenbrood

unread,
Nov 18, 2010, 10:26:54 AM11/18/10
to

Got it fixed with :

Header edit Location "^http\:(.*)$" "https:$1"

Thx :P

0 new messages