您的位置:首页 > 运维架构 > Nginx

centos下nginx关闭后启动失败解决方法

2017-03-02 11:47 393 查看
情况:

[root@qwer init.d]# /usr/local/nginx-1.5.1/sbin/nginx -t   (测试配置文件语法是否正确)

nginx: the configuration file /usr/local/nginx-1.5.1//conf/nginx.conf syntax is ok

nginx: configuration file /usr/local/nginx-1.5.1//conf/nginx.conf test is successful

[root@qwer init.d]# /usr/local/nginx-1.5.1/sbin/nginx -s reload (平滑重启)

nginx: [alert] kill(22359, 1) failed (3: No such process)

[root@qwer init.d]# ps -ef|grep nginx

root      22426      1  0 13:44 ?        00:00:08 gedit /usr/local/nginx-1.5.1/logs/access.log

root      22781   5280  0 14:33 pts/2    00:00:00 grep nginx

解决方法:

[root@qwer init.d]# /usr/local/nginx-1.5.1/sbin/nginx -c /usr/local/nginx-1.5.1/conf/nginx.conf    (使用-c指定配置文件)

[root@qwer init.d]# /usr/local/nginx-1.5.1/sbin/nginx -s reload 

[root@qwer init.d]# ps -ef|grep nginx

root      22426      1  0 13:44 ?        00:00:08 gedit /usr/local/nginx-1.5.1/logs/access.log

root      22803      1  0 14:38 ?        00:00:00 nginx: master process /usr/local/nginx-1.5.1/sbin/nginx -c /usr/local/nginx-1.5.1/conf/nginx.conf

nobody    22807  22803  0 14:38 ?        00:00:00 nginx: worker process                                                      

root      22809   5280  0 14:38 pts/2    00:00:00 grep nginx
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: