title: Setting up nginx getting 404 because of folder permission?
body: <p>I have just installed nginx and i think my configs are just right.. But i still get 404 on the page im trying to access, I reviewed other setups on nginx and found one which included on how to see nginx log. I tried it then, tried to access again on the browser the site i have setup but still see the 404 error. I checked the log and found out that as nginx was trying to access my declared site, It gave a permission denied : Here is the actual part of the log:</p>
  
  <pre><code>    2013/12/19 00:02:30 [crit] 886#0: *14 stat() "/Users/lame/Documents/Projects/mysite/workspace/" failed (13: Permission denied), client: 127.0.0.1, server: dev.mysit$
      2013/12/19 00:02:30 [crit] 886#0: *14 stat() "/Users/lame/Documents/Projects/mysite/workspace/" failed (13: Permission denied), client: 127.0.0.1, server: dev.mysit$
      2013/12/19 00:02:30 [error] 886#0: *14 kevent() reported that connect() failed (61: Connection refused) while connecting to upstream, client: 127.0.0.1, server: dev.mysite.$
      2013/12/19 00:02:30 [error] 886#0: *14 open() "/opt/local/share/nginx/html/50x.html" failed (2: No such file or directory), client: 127.0.0.1, server: dev.mysite.com, reque$
      2013/12/19 00:02:31 [crit] 886#0: *14 stat() "/Users/lame/Documents/Projects/mysite/workspace/" failed (13: Permission denied), client: 127.0.0.1, server: dev.mysit$
      2013/12/19 00:02:31 [crit] 886#0: *14 stat() "/Users/lame/Documents/Projects/mysite/workspace/" failed (13: Permission denied), client: 127.0.0.1, server: dev.mysit$
  </code></pre>
  
  <p>It looks like i cant access it but when i checked permission on <code>mysite</code> folder it was : <code>drwxr-xr-x</code> . It looks like a permission problem, but im not really good at managing permission. ANy help please ? Its been days that ive been trying t set this up :(</p>
  
  <p>I actually started this question here : <a href="https://stackoverflow.com/questions/20619891/setting-up-site-with-homebrewed-nginx-got-404-on-site-reason-why-it-is-happenin">Setting up site with homebrewed nginx got 404 on site? Reason why it is happening?</a>, 
  but still couldnt find an  answer. My setup is more detailed there. Thanks in advance.</p>