记录一次nginx的bug问题failed(13:Permission denied)

2020/05/22 14:56:26 [error] 11506#0: *1 rewrite or internal redirection cycle while internally redirecting to "/index.html", client: 10.19.86.5, server: 10.19.86.5, request: "GET / HTTP/1.1", host: "10.19.86.5"
2020/05/22 15:01:23 [crit] 11506#0: *2 stat() "/home/puaiuc/app/dist/" failed (13: Permission denied), client: 10.19.86.5, server: 10.19.86.5, request: "GET / HTTP/1.1", host: "10.19.86.5"
2020/05/22 15:01:23 [crit] 11506#0: *2 stat() "/home/puaiuc/app/dist/" failed (13: Permission denied), client: 10.19.86.5, server: 10.19.86.5, request: "GET / HTTP/1.1", host: "10.19.86.5"
2020/05/22 15:01:23 [crit] 11506#0: *2 stat() "/home/puaiuc/app/dist/index.html" failed (13: Permission denied), client: 10.19.86.5, server: 10.19.86.5, request: "GET / HTTP/1.1", host: "10.19.86.5"
2020/05/22 15:01:23 [crit] 11506#0: *2 stat() "/home/puaiuc/app/dist/index.html" failed (13: Permission denied), client: 10.19.86.5, server: 10.19.86.5, request: "GET / HTTP/1.1", host: "10.19.86.5"
2020/05/22 15:01:23 [crit] 11506#0: *2 stat() "/home/puaiuc/app/dist/index.html" failed (13: Permission denied), client: 10.19.86.5, server: 10.19.86.5, request: "GET / HTTP/1.1", host: "10.19.86.5"
2020/05/22 15:01:23 [crit] 11506#0: *2 stat() "/home/puaiuc/app/dist/index.html" failed (13: Permission denied), client: 10.19.86.5, server: 10.19.86.5, request: "GET / HTTP/1.1", host: "10.19.86.5"
2020/05/22 15:01:23 [crit] 11506#0: *2 stat() "/home/puaiuc/app/dist/index.html" failed (13: Permission denied), client: 10.19.86.5, server: 10.19.86.5, request: "GET / HTTP/1.1", host: "10.19.86.5"
2020/05/22 15:01:23 [crit] 11506#0: *2 stat() "/home/puaiuc/app/dist/index.html" failed (13: Permission denied), client: 10.19.86.5, server: 10.19.86.5, request: "GET / HTTP/1.1", host: "10.19.86.5"
2020/05/22 15:01:23 [crit] 11506#0: *2 stat() "/home/puaiuc/app/dist/index.html" failed (13: Permission denied), client: 10.19.86.5, server: 10.19.86.5, request: "GET / HTTP/1.1", host: "10.19.86.5"
2020/05/22 15:01:23 [crit] 11506#0: *2 stat() "/home/puaiuc/app/dist/index.html" failed (13: Permission denied), client: 10.19.86.5, server: 10.19.86.5, request: "GET / HTTP/1.1", host: "10.19.86.5"
2020/05/22 15:01:23 [crit] 11506#0: *2 stat() "/home/puaiuc/app/dist/index.html" failed (13: Permission denied), client: 10.19.86.5, server: 10.19.86.5, request: "GET / HTTP/1.1", host: "10.19.86.5"
2020/05/22 15:01:23 [crit] 11506#0: *2 stat() "/home/puaiuc/app/dist/index.html" failed (13: Permission denied), client: 10.19.86.5, server: 10.19.86.5, request: "GET / HTTP/1.1", host: "10.19.86.5"
2020/05/22 15:01:23 [crit] 11506#0: *2 stat() "/home/puaiuc/app/dist/index.html" failed (13: Permission denied), client: 10.19.86.5, server: 10.19.86.5, request: "GET / HTTP/1.1", host: "10.19.86.5"
2020/05/22 15:01:23 [crit] 11506#0: *2 stat() "/home/puaiuc/app/dist/index.html" failed (13: Permission denied), client: 10.19.86.5, server: 10.19.86.5, request: "GET / HTTP/1.1", host: "10.19.86.5"
2020/05/22 15:01:23 [crit] 11506#0: *2 stat() "/home/puaiuc/app/dist/index.html" failed (13: Permission denied), client: 10.19.86.5, server: 10.19.86.5, request: "GET / HTTP/1.1", host: "10.19.86.5"
2020/05/22 15:01:23 [crit] 11506#0: *2 stat() "/home/puaiuc/app/dist/index.html" failed (13: Permission denied), client: 10.19.86.5, server: 10.19.86.5, request: "GET / HTTP/1.1", host: "10.19.86.5"
2020/05/22 15:01:23 [crit] 11506#0: *2 stat() "/home/puaiuc/app/dist/index.html" failed (13: Permission denied), client: 10.19.86.5, server: 10.19.86.5, request: "GET / HTTP/1.1", host: "10.19.86.5"

通过查看nginx日志,出现了failed (13: Permission denied)错误,发现是权限的问题,就将/etc/nginx/nginx.conf中的第一行改为 user root
在这里插入图片描述

重启nginx指令,进入到nginx的sbin目录下,

./nginx -s reload 
Logo

鸿蒙生态一站式服务平台。

更多推荐