我有nginx http授权的问题


I have got problems with nginx http autorisation

我带着所有的配置和htpasswd把项目从工作带到家里。pwd文件。在工作中一切都很好,在家里我看到内部500错误。

在日志中我得到了这个:

2014/08/03 21:06:53 [crit] 8543#0: *15 open() "/etc/nginx/htpasswd.pwd" failed (13: Permission denied), client: 127.0.0.1, server: mylocal.dev, request: "GET / HTTP/1.1", host: "mylocal.dev"

这是我的namei -l结果:

root@laptop:/home/root# namei -l /etc/nginx/htpasswd.pwd 
f: /etc/nginx/htpasswd.pwd
drwxr-xr-x root    root    /
drwxr-xr-x root    root    etc
drw-r--r-- myuser  myuser nginx
-rwxr-xr-x myuser  myuser htpasswd.pwd

我必须做什么?

设置htpasswd的chmod。

将PWD设置为0755,如果这不起作用,将其设置为0777。