You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Ralf S. Engelschall" <rs...@engelschall.com> on 1997/07/09 08:42:27 UTC
Strange interaction between mod_rewrite and proxy module (fwd)
A user asked me the following mod_rewrite/mod_proxy question, but
because it seems more related to mod_proxy I ask the group.
Perhaps someone knows where the problem lies.
Greetings,
Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com
> I'm using Apache 1.2 under solaris 2.5.1. I'm puzzled by an odd interaction
> between the proxy/rewrite modules.
>
> In httpd.conf:
>
> ProxyRequests On
> #ProxyRemote http://ss1.bath.ac.uk http://ss1.bath.ac.uk/
> #ProxyRemote * http://wwwcache.bath.ac.uk:3128/
>
> In srm.conf:
>
> RewriteRule ^/cgi-bin/info2html(.*) http://ss1.bath.ac.uk/cgi-bin/info2html$1 [P
> ,L]
>
> If I then request /cgi-bin/info2html?(info)Top from the server, the logs
> on ss1.bath.ac.uk show a request for /cgi-bin/info2html?(info)Top as I
> would expect.
>
> However, I need to chain the server on to our main cache. But when I do
> this by uncommenting the line,
>
> ProxyRemote * http://wwwcache.bath.ac.uk:3128/
>
> The request in the access logs for wwwcache are for /cgi-bin/info2html
> and not http://ss1.bath.ac.uk/cgi-bin/info2html?(info)Top
>
> Why are the proxy requests generated by the rewrite rule losing the
> protocol://host and query strings when other proxy requests are
> working?
>
> Clearly, I can almost achieve what I require by uncommenting the line:
>
> ProxyRemote http://ss1.bath.ac.uk http://ss1.bath.ac.uk/
>
> But still the requests show up on ss1.bath.ac.uk as /cgi-bin/info2html
> without the crucial query string.
>
> The rewrite_log consistantly shows the correct rewrites, that is:
>
> xxx.bath.ac.uk - - [10/Jun/1997:17:54:15 +0100] [www.bath.ac.uk/sid#7b0c0][rid#96568/initial] (1) go-ahead with proxy request proxy:http://ss1.bath.ac.uk/cgi-bin/info2html?(info)Top [OK]
>
> My question is, why is the query string lost?
RE: Strange interaction between mod_rewrite and proxy module (fw
Posted by Lars Eilebrecht <La...@unix-ag.org>.
According to Ralf S. Engelschall:
> > ProxyRequests On
> > #ProxyRemote http://ss1.bath.ac.uk http://ss1.bath.ac.uk/
> > #ProxyRemote * http://wwwcache.bath.ac.uk:3128/
As I pointed out in PR656 and a in recent post to this list (about
Proxy Setup), the ProxyRemote code is broken. The proxy module
simply send no valid proxy-request but a normal HTTP-request
with a Host-Header.
Regards...
--
Lars Eilebrecht
sfx@unix-ag.org