You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jeff Fletcher <jf...@quark.com> on 2002/09/17 13:42:27 UTC

[users@httpd] mod_proxy and 301 responses

I have set up Apache as a proxy for another web server.  The config is like
this:
<IfModule mod_proxy.c>
	ProxyRequests On
	ProxyPass / http://server:port/
</IfModule mod_proxy.c>

When the origin server gets the "http://server:port" request, it replies
with a 301, such as:
HTTP/1.1 301 Moved Permanently
Date: Sun, 16 Sep 2001 05:54:20 GMT
Server: Quark Enterprise Web Server/1.6
Location: http://server:port/resource/that/exists.html
Content-Length: 0
Content-Type: text/plain; charset=ISO-8859-1

This is all working fine with Apache 1.3.22, but not with 2.0.40.  In
2.0.40, after the origin server replies with the 301, Apache seems to wait
(timeout duration?) and then send the 301 on to the browser, which asks for
the new location and then everything is fine.  But it's the initial ~5
minute delay that we can't live with.
Note that if I set up the proxy to a real resource the proxy works fine.
It's only when the 301 reply is involved that I am having trouble.

Is this a bug or a configuration issue?

Thanks for helping,

Jeff Fletcher
Quark Internet Publishing Business Unit
jfletcher@quark.com


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


Re: [users@httpd] mod_proxy and 301 responses

Posted by Zac Stevens <zt...@cryptocracy.com>.
Hi Jeff,

On Tue, Sep 17, 2002 at 05:42:27AM -0600, Jeff Fletcher wrote:
> I have set up Apache as a proxy for another web server.  The config is like
> this:
> <IfModule mod_proxy.c>
> 	ProxyRequests On
> 	ProxyPass / http://server:port/
> </IfModule mod_proxy.c>
> 
> When the origin server gets the "http://server:port" request, it replies
> with a 301, such as:
> HTTP/1.1 301 Moved Permanently
> Date: Sun, 16 Sep 2001 05:54:20 GMT
> Server: Quark Enterprise Web Server/1.6
> Location: http://server:port/resource/that/exists.html
> Content-Length: 0
> Content-Type: text/plain; charset=ISO-8859-1

I'm just curious, is the resource actually accessible to the ourside world
via the http://server:port/ URL?  While it is inconsistant with the
symptoms you've described, I wonder if perhaps you haven't used the
ProxyPassReverse directive when you need to.

Take a look at:
http://httpd.apache.org/docs/mod/mod_proxy.html#proxypassreverse

Cheers,


Zac

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