小编Joh*_*sen的帖子

CentOS 6.6 和 Nginx 1.6.2 - 突然无法重启 nginx - nginx: [emerg] open() "/usr/share/nginx/on" failed (13: Permission denied)

这是一个新安装,其中 nginx 以前正常启动和停止。我相信在启用成功测试 (nginx -t) 的服务器块后会出现此错误。然后我尝试重新启动 nginx 并收到此错误:

nginx: [emerg] open() "/usr/share/nginx/on" failed (13: Permission denied)
Run Code Online (Sandbox Code Playgroud)

在尝试重新启动之前,文件“on”不存在。它刚刚创建并且是空的。当我重新启动 php-fmp(成功)然后再次尝试重新启动 nginx 时,错误更改为:

nginx: [emerg] open() "/var/run/nginx.pid" failed (13: Permission denied)
nginx: configuration file /etc/nginx/nginx.conf test failed
Run Code Online (Sandbox Code Playgroud)

但同样,当我运行 nginx -t 时,测试成功:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Run Code Online (Sandbox Code Playgroud)

我认为这可能是用户问题,但一切似乎都很好:

# ps -elf | grep nginx
5 S nginx     2774  2773  0  80   0 - 234152 skb_re 22:07 ?       00:00:00 php-fpm: pool www
5 S nginx …
Run Code Online (Sandbox Code Playgroud)

nginx centos php-fpm

2
推荐指数
2
解决办法
2万
查看次数

标签 统计

centos ×1

nginx ×1

php-fpm ×1