代码改变世界

Nginx 日志 failed (13: Permission denied) 错误(13:权限被拒绝)

2022-09-14 07:33  猎手家园  阅读(2724)  评论(0编辑  收藏  举报

错误分析:

  权限拒绝

 

主要原因:

  Nginx用户和应用用户不一致造成的

 

解决办法:

  修改nginx.conf 文件,将其用户改为一致(一般在第1行)

user        root

查看如下:

[root@centos conf]# ps -ef | grep nginx
root        2576       1  0 00:35 ?        00:00:00 nginx: master process ./sbin/nginx
root       10934    2576  0 01:26 ?        00:00:00 nginx: worker process
root       10935    2576  0 01:26 ?        00:00:01 nginx: worker process