So I have an nginx server running on Mac OSX and I am trying to create a symlink in my nginx www directory from somewhere else. In the browser I get the wonderful 403 Forbidden error.
I have also tried chmod'ing my life away for the past few hours.

There doesn't seem to be anything on the stack about it. One thing concerns me is that I am not sure if symlinks are directly supported by ngninx on Mac.

1 Answer
1

I can verify that symlinks with nginx work on the mac with nginx 1.2.7.

Symlink created as:

ln -s /Users/salpher/nginxtest /usr/local/opt/nginx/html/

Do you have any content in the 'client' directory? Directory index browsing is disabled by default and you will see a 403 forbidden if there is no index page and your url does not point at a particular content file.

If it's directory browsing that you're after you can enable that in your directory config with autoindex on;

Yes, there are two files in the 'client' directory. Autoindex is turned on. I do not have an index file for the directory though or the root directive. I don't think that's creating the problem though.
–
Levi RobertsDec 6 '13 at 5:00

Can't seem to edit my other comment. I tried adding the root directive and an index directive, neither and both did not fix the issue. I also found that I get the same "permission denied" message when trying to point '/client' in the nginx config to the original 'client' directory.
–
Levi RobertsDec 6 '13 at 5:21

Do you also get a 403 when your URL points at an html file or something other than a directory?
–
Sam AlpherDec 6 '13 at 12:52

If you haven't already you might check out serverfault.com/questions/218583/… . Sounds similar. Also, how did you install nginx? Was it a binary installation or did you grab the code and compile? If it was a binary installation where did it come from? For reference my test setup came from a brew installation.
–
Sam AlpherDec 6 '13 at 14:25