nginx 配置目录账号密码访问,出现 403forbidden
nginx配置
server{
...
location /uploads {
auth_basic "Please enter Password";
auth_basic_user_file /usr/local/etc/nginx/my_nginx_passwd;
}
}
1.jpg
2.jpg
chmod -R 777 uploads
修改uploads权限也没效果;
nginx日志
2019/07/12 13:49:47 [error] 15939#0: *1542 directory index of "/usr/local/var/www/ace/uploads/" is forbidden, client: 127.0.0.1, server: www.ace.com, request: "GET /uploads/ HTTP/1.1", host: "www.ace.com"
http://nginx.org/en/docs/http/ngx_http_aut... 参考文档