Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nginx not following symlinks

Tags:

nginx

symlink

I have installed nginx on Ubuntu 12.04. However, nginx does not seem to follow symlinks. I understand that there is a config change required for this but I am not able to find where to make the change. Any help appreciated.

like image 967
Neo Avatar asked Sep 27 '12 15:09

Neo


People also ask

How do I remove a symbolic link in nginx?

Remove a Symbolic Link using the rm command You can also use the -i flag with the rm command to prompt for confirmation. After that, you can use the ls -l command to confirm if the symlink has been removed. That is all there is to it!

Do Symlinks work both ways?

Yes, a symbolic link is a pointer to another location. This means that any changes you make are in fact updating at the target location.

Will rm follow symlinks?

rm -rf won't follow symbolic links - it will simply remove them.

Does du follow symlinks?

The -L option tells du to process symbolic links by using the file or directory which the symbolic link references, rather than the link itself.


1 Answers

Have a look at the following config option from nginx docs:

Syntax:

disable_symlinks off; disable_symlinks on | if_not_owner [from=part]; 

Default: disable_symlinks off;

Context: http, server, location

This directive appeared in version 1.1.15.

like image 145
cobaco Avatar answered Sep 20 '22 02:09

cobaco