RE: Apache mod_rewrite/mod_proxy conflict?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



What you suggest would be security problem because it would allow anyone to use your RP to attack hosts on your network, or on external networks.

Apart from that there is another mechanism (RewriteMap) that allows you to build the target URL dynamically. And no, neither ProxyPassReverse nor any other mechanism allows you to rewrite the Location response header in such a setting.

That said, I believe that those applications that do not use X-Forwarded-For will use the Host header to determine the host portion of the URL when doing a redirection. If that is the case you can set "ProxyPreserveHost On" and you would not need to worry about ProxyPassReverse.

-ascs
 
-----Message d'origine-----
De : pdt_p [mailto:pinlie@xxxxxxxxx] 
Envoyé : mercredi 12 décembre 2007 05:01
À : users@xxxxxxxxxxxxxxxx
Objet : Re:  Apache mod_rewrite/mod_proxy conflict?


Hi.. 

I forgot to mention, the reason why I asked about this dynamic URL because I have more than 1 internal server and the ip address/hostname for each internal server that I have to connect to is returned from url parameter.
for example: 
  -  http://<myReveseProxyHostName>/testing/myserverB/otherPath --> http://myserverB/otherPath
   - http://<myReveseProxyHostName>/testing/192.168.0.88/otherPath --> http://192.168.0.88/otherPath


pdt_p wrote:
> 
> Hi...
> 
> from this solution:
> RewriteRule ^/testing/(.*)$ http://myserverB/$1 [P,L] RewriteRule 
> ^/(.*)$ http://myserverA/$1 [P] ProxyPassReverse /testing 
> http://myserverB/
> 
> the original server url is fixed. In this case  http://myserverB and 
> http://myserverA. What if the original URL is dynamic which is passed 
> from parameter?
> for example: 
>    http://<myReveseProxyHostName>/testing/myserverB/otherPath --> 
> http://myserverB/otherPath
> 
> I think for RewriteRule is quite straight forward: RewriteRule 
> ^/testing/(.*)$ http://$1 [P] but how about the ProxyPassReverse?
> 
> Thank you very much.

---------------------------------------------------------------------
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: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux