httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yang Zhang <yanghates...@gmail.com>
Subject Re: [users@httpd] How to prevent mod_proxy from rewriting redirects into absolute URLs?
Date Mon, 19 Nov 2012 01:35:02 GMT
On Sun, Nov 18, 2012 at 4:03 PM, Nick Kew <nick@webthing.com> wrote:
> On Sun, 18 Nov 2012 14:48:35 -0800
> Yang Zhang <yanghatespam@gmail.com> wrote:
>
>> I have: nginx (port 80) reverse-proxying to apache2 (port 88)
>> reverse-proxying to a web app (port 5001).
>>
>> However, when the web app responds with a redirect like `Location:
>> /foo`,
>
> That is not valid HTTP.  A Location header must be an absolute URI.

OK, in that case I'd like `Location: http://host.com/sub/foo` and not
`http://host.com:88/sub/foo`.

>
>  apache2 rewrites this into `Location:
>> http://host.com:88/sub/foo`, even though port 88 is publicly
>> inaccessible.
>
> So where does :88 come from?  Looks like a misconfiguration
> somewhere outside the section you quoted.

Well, I know from inspecting the wire traffic that this is coming from
apache's response to nginx (since, again, apache listens on 88).

The top of the config is what specifies this:

<VirtualHost *:88>

>
>
> --
> Nick Kew
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>



--
Yang Zhang
http://yz.mit.edu/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message