David f. wrote:
Hi,
How can I turn ProxyPreserveHost on for for some RewriteRules then off
again for some ProxyPass lines in the same vhost?
Putting ProxyPreserveHost On before the Rewrites works as expected
(turns it on), but when I put the ProxyPreserveHost Off command before
the ProxyPass lines, it has no effect, ProxyPreserveHost appears to
still be on. It's as if the directive is ignored. Is this the
correct behaviour?
The docs are not real clear on this point and there are no entries in
bugzilla.
Thanks!
David f.
Hit send too soon, here are the details:
Apache 2.2.2
<VirtualHost 192.168.107.37>
ServerName www.domain.com
DocumentRoot /data/domain
<IfDefine REVERSE_PROXY>
ProxyPreserveHost On
RewriteCond %{LA-U:SCRIPT_FILENAME} \.spy$ [NC]
RewriteRule .* http://192.168.107.37:8080%{REQUEST_URI} [P,L]
ProxyPassReverse / http://192.168.107.37:8080/
# ProxyPreserveHost Off <--- Uncommenting this causes apache to
always redirect back to domain.com!
</IfDefine>
<IfModule mod_proxy.c>
ProxyRequests Off
ProxyPass /fr/forum/ http://forums_fr.domain.com/
ProxyPassReverse /fr/forum/ http://forums_fr.domain.com/
ProxyPass /en/forum/ http://forums_en.domain.com/
ProxyPassReverse /en/forum/ http://forums_en.domain.com/
</IfModule>
</VirtualHost>
forums_en.domain.com and forums_fr are hosts in a private IP space that
is only accessible from the web server. They are defined in the
webserver's hosts file.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]