phpdocker-io/phpdocker.io

http ngninx follow symlinks

svanschu opened this issue · 2 comments

I currently have the issue that my environment is set up with symlinks. The symlinks on server base a working well, but for example .js files which where behind a symlink are to processed by the http request.

The http config of the nginx server need the statement

http {
disable_symlinks off;
}

I tried to add it to the default.conf, but it does not have an effect.

I read that default of nginx ist disable_symlinks off;

I set permission to www-data:www-data, but still the browser shows a 404 on finding the js file.

If I delete the symlink and copy the file directly, it works, so the path is correct. It just can't follow the symlink

Ok found it. It was a classic layer 8 problem. I created the volume for the symlink in the php-fpm container, but I forgot the nginx container ...