我刚刚安装了nginx,我认为我的配置是正确的..但我仍然在尝试访问的页面上获得404,我查看了nginx上的其他设置,并找到了一个包含如何查看nginx日志。然后我尝试了,尝试再次访问浏览器我已设置的网站,但仍然看到404错误。我检查了日志,发现当nginx试图访问我声明的网站时,它拒绝了权限:这是日志的实际部分:
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$
看起来我无法访问它,但当我检查mysite
文件夹的权限时,它是:drwxr-xr-x
。它看起来像是一个权限问题,但我并不擅长管理权限。请帮忙吗?我一直试图设置它的日子:(
我实际上在这里开始提出这个问题:Setting up site with homebrewed nginx got 404 on site? Reason why it is happening?, 但仍然无法找到答案。我的设置在那里更详细。提前谢谢。