Bug 53947

Summary: Feature Request, RewriteRule - ProxyPreserveHost flag (and related)
Product: Apache httpd-2 Reporter: Francois Leurent <131.apache>
Component: mod_rewriteAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: NEW ---    
Severity: enhancement CC: 131.apache
Priority: P2    
Version: 2.5-HEAD   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description Francois Leurent 2012-09-29 17:39:27 UTC
Hi
- ProxyPreserveHost is a server conf directive only, and in my opinion, a must have feature for in all cluster & lb related proxy configuration.
- RewriteRule [P] is a very usefull directive for migrating a specific part of an application to another server

- There should be very little depency between a cluster IP and a service name (domain name) - that's the whole purpose  of ProxyPreserveHost

In massive name base virtualhost environnement, i have only ONE virtualhost
<Virtualhost>
  ServerAlias allalloweddomains.tld
  VirtualDocumentRoot /etc/httpd/redirector/%0
</VirtualHost>

I cannot enable ProxyPreserveHost on the whole Virtualhost (location /services/ is irrelevant).

I'm asking for 
* enabling ProxyPreserveHost in .htaccess ? [OR]
* creating an inline ProxyPreserveHost RewriteRule flag

Therefore, the
RewriteCond %QUERY_STRING ClassName=SpecificSOAPWSClass
RewriteCond (.*)  http:// [cluster ip with upcomming architecture evolution]/$1 [P,PPH]

Would work as supposed.
New apache extensions mod_remoteip are (kindeof) around same kind of proxy/lb transparency issue.


In the same spirit, ProxyImposeHost might also be usefull
RewriteCond (.*)  http:// [cluster ip with upcomming architecture evolution]/$1 [P,PIH=newfeature.domain.com]

I hope you'll agree with this new feature.

Best Regards.