微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

CentOS 6.6 with Nginx 1.6.2 – 突然无法重启nginx – nginx: open“/ usr / share / nginx / on”失败13:Permission denied

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

Nginx: [emerg] open() "/usr/share/Nginx/on" Failed (13: Permission denied)

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

Nginx: [emerg] open() "/var/run/Nginx.pid" Failed (13: Permission denied) Nginx: configuration file /etc/Nginx/Nginx.conf test Failed

make:execvp:g ++:权限被拒绝

如何解决CentOS中的“无法连接到MysqL主机”错误

Git推送到cPanel账户 – 推送没有更新修改后的文件

使用vagrant来提供简单的MysqL设置(使用shellconfiguration程序)

在CentOS 7上使用cron job运行服务

但是,当我运行Nginx -t ,我得到:

Nginx: the configuration file /etc/Nginx/Nginx.conf Syntax is ok Nginx: configuration file /etc/Nginx/Nginx.conf test is successful

我认为这可能是一个用户问题,但它运行为Nginx

# 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 2775 2773 0 80 0 - 234152 skb_re 22:07 ? 00:00:00 PHP-fpm: pool www 5 S Nginx 2776 2773 0 80 0 - 234152 skb_re 22:07 ? 00:00:00 PHP-fpm: pool www 5 S Nginx 2777 2773 0 80 0 - 234152 skb_re 22:07 ? 00:00:00 PHP-fpm: pool www 5 S Nginx 2778 2773 0 80 0 - 234152 skb_re 22:07 ? 00:00:00 PHP-fpm: pool www 0 R root 2940 2472 0 80 0 - 25811 - 22:18 pts/0 00:00:00 grep Nginx

另外,使用sudo Nginx -t不会改变任何东西。 奇怪的是,即使Nginx没有运行,也有一个Nginx.pid。 删除pid文件只是将错误消息更改回:

Nginx: [emerg] open() "/usr/share/Nginx/on" Failed (13: Permission denied)

删除文件也没有区别。

SNOS中的SNAT目标选项

docker不响应CTRL + C在terminal

docker:当连接到发布的端口时连接被拒绝

添加一个斜杠mod_rewrite

需要帮助在centos上安装pecl 5.8

确保您以超级用户身份运行。

sudo Nginx -t

运行getenforce来检查SELinux模式。 如果它表示强制,则通过运行setenforce 0临时将模式设置为Permissive,然后查看您的应用程序是否工作。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐