$_FILE_TO_URL_MAPPING and symlinks

In case you install your Website with a tool like capistrano, where you have a bunch of "releases" folders and the webroot is symlinked to the current release, you get funny errors like:

[Warning] Director::protocolAndHost() lacks sufficient information - HTTP_HOST not set

In this case you have to use realpath() to let php calculate, as the funciton name says, real path of your symlinked webroot, like:

$_FILE_TO_URL_MAPPING[realpath('/path/to/html/www.foo.at/www')] = 'http://www.foo.at';
Rate this post

Post your comment

Comments

  • Paweł P. 14/07/2016 12:43pm (9 months ago)

    Please extend about configuration.
    Set a little example – I Am interested. Thanks!

RSS feed for comments on this page | RSS feed for all comments