Why does baseURL contain both httpXForwardedHost + httpHost
I see a lot of posts and closed bugs because the server incorrectly sets httpXForwardedHost. However, I don't think this is the case as I really am using forwarding.
I have test.theaterwerk-bodensee.de forwarded to tw.alien878.de. Unfortunately, when I go to http://test.theaterwerk-bodensee.de the baseURL ends up as:
Code:
<base href="http://test.theaterwerk-bodensee.de/tw.alien878.de/" />
when it should be:
Code:
<base href="http://test.theaterwerk-bodensee.de/" />
Why is it adding the httpHost? I can fix this in function url of Environment.php, but that doesn't seem to be the right answer.
Allen
Re: Why does baseURL contain both httpXForwardedHost + httpH
I assisted a client install contao on our services at WebFaction today and had a similar issue.
We use a front-end nginx proxy server to route URLs and so this was happening. I resolved it by adding this,
./settings/config/localconfig.php
Code:
$_SERVER ['HTTP_X_FORWARDED_FOR'] ='';
$_SERVER ['HTTP_X_FORWARDED_HOST'] ='';
It would be nice to have some increased documentation on baseURL, how it is built, and ways to override it.