Nginx does not follow symbolic links. I get a 404 error. In my directory, I have this link:
lrwxrwxrwx 1 root root 48 Sep 23 08:52 modules -> /path/to/dir/
but the files stored in /path/to/dir aren't found.
Nginx does not follow symbolic links. I get a 404 error. In my directory, I have this link:
lrwxrwxrwx 1 root root 48 Sep 23 08:52 modules -> /path/to/dir/
but the files stored in /path/to/dir aren't found.
I insert disable_symlinks off; in my nginx.conf and i resolved, works fine!
http {
disable_symlinks off;
}
Use 'bind' option by mounting folders =)
sudo nano /etc/fstab
Type:
/path/where/my/big/files_dir /var/www/myhost/media_dir bind defaults,bind 0 0
(no symlinks & don't forget restart vds/cpu)
I found the solution on this post.
More specifically, these lines:
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;