Forums / Install & configuration / eZHTTPTool::redirect and reverse proxy
Guillaume Mouricou
Friday 12 June 2009 6:12:41 am
Hello,
When a reverse proxy is used, the eZ Publish redirect are wrong.
eZHTTPTool::redirect() use eZSys::hostName() to get the hostName, that function use $_SERVER['HTTP_HOST'] which is the same as the Host header in the HTTP request. So the hostname of the webserver will be used instead of the hostname of the reverse proxy server.
Can I configure eZ Publish to resolve this issue?
Best regards.
Gaetano Giunta
Saturday 13 June 2009 3:29:50 am
Looking at http://issues.ez.no/1304 it seems like this has been a known problem for a long time...
Principal Consultant International Business Member of the Community Project Board
Saturday 13 June 2009 3:32:02 am
... otoh looking at http://issues.ez.no/11695 it seems like it will be fixed in the next round of upgrades!
Kristof Coomans
Saturday 13 June 2009 10:49:25 am
If you are using Apache as reverse proxy, then use the ProxyPassReverse directive to adjust the Location HTTP header, see http://httpd.apache.org/docs/1.3/mod/mod_proxy.html#proxypassreverse. I guess other reverse proxy software has such configuration option as well.
independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org
Monday 15 June 2009 7:44:04 am
Ok.
Thanks for your replies.