httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Skye Poier Nott <s...@F4.ca>
Subject Re: mod_proxy performance with apache 2.2
Date Thu, 20 Mar 2008 22:13:06 GMT
Interesting, well maybe a reworked proxy config would help.

How do I proxy requests without rewriting the URL?

Say my client makes a request for http://w0000.example.com/index.html,  
which resolves to the IP of my proxy on the client.  I want the proxy  
to get the file from 10.100.10.65, the origin, and do the same with  
virtual hosts w0001.example.com, w0002.example.com, etc.

All the examples in the Apache docs seem to assume the origin  
(backend) is only serving one virtual host.

If I configure the proxy with either of

ProxyPass / http://10.100.10.65/
RewriteRule (.*) http://10.100.10.65$1 [P]

Then all the requests on the origin are for the IP of the origin, not  
the original named virtual host, so the wrong files get served from  
the origin.

The only way I've been able to do this is to do:

RewriteRule (.*) http://%{HTTP_HOST}$1 [P]

and have the proxy server's DNS configured to resolve  
wXXXX.example.com to 10.100.10.65, but that's not very nice if I'm  
going to have 10,000+ vhosts.  I just want to pass the original  
request to 10.100.10.65, is this possible???

I did this rather easily with lighttpd with the directive:

proxy.server  = ( "/" => ( ( "host" => "10.100.10.65", "port" => 80 )))

Thanks
Skye


Mime
View raw message