[LUNI] mod_proxy overriding mod_rewrite
sten
lists at redboy.cx
Wed Nov 22 09:55:23 CST 2006
I'm playing stupid apache tricks with my home web services. Basically, my setup looks like this:
A1 -> VPN -> A2
Where A1 is a wimpy virtual host running Apache2, which passes requests over my VPN to A2, a fairly muscular machine sitting in my house, through mod_proxy's ProxyPass directive. The problem is, I have mod_rewrite on A1 kicking some requests over to SSL, but if I ProxyPass /, the rewrites never happen, even if the rewrite directives come before the ProxyPass / directive. From the config:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/mail$
RewriteRule ^(.*)$ https://server$1 [R=301,L]
...
ProxyPass / http://vpn-client/sten
ProxyPassReverse http://vpn-client/sten /
If I browse to A1 and request /, I get the page, but /mail gets me a 404. Comment out the Proxy commands, and /mail works, but (obviously), / gets me a 404. Any suggestions on how I can have my cake and eat it too?
Thanks!
Sten
More information about the luni
mailing list