You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by David Wolever <wo...@gmail.com> on 2006/04/19 18:47:21 UTC

[users@httpd] Fiddling with mod_proxy Output

Hey,
I'm using mod_proxy to give people outside my LAN access to an
internal web page.  The problem is, the web server being used to serve
that page (Xitami) makes poor use of redirect headers.  When a
directory is requested with out a trailing slash (eg /foo instead of
/foo/), a 302 is sent back but the Location: provided is the IP
address of the server instead of the hostname requested (eg: Location:
http://192.168.1.2/foo/ instead of http://xitami.example.com/foo/).
I have been fiddling with the Xitami config, but things don't look
hopeful.  Is there any way I can use Apache/mod_proxy to change that
header to what it should be (a 301 and the correct location)?
Thanks,
David

---------------------------------------------------------------------
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] Fiddling with mod_proxy Output

Posted by Joshua Slive <jo...@slive.ca>.
On 4/19/06, David Wolever <wo...@gmail.com> wrote:
> Hey,
> I'm using mod_proxy to give people outside my LAN access to an
> internal web page.  The problem is, the web server being used to serve
> that page (Xitami) makes poor use of redirect headers.  When a
> directory is requested with out a trailing slash (eg /foo instead of
> /foo/), a 302 is sent back but the Location: provided is the IP
> address of the server instead of the hostname requested (eg: Location:
> http://192.168.1.2/foo/ instead of http://xitami.example.com/foo/).
> I have been fiddling with the Xitami config, but things don't look
> hopeful.  Is there any way I can use Apache/mod_proxy to change that
> header to what it should be (a 301 and the correct location)?

That is what the ProxyPassReverse directive is designed to do.  You
can probably list two of them: one for the name and one for the IP.

Joshua.

---------------------------------------------------------------------
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