CentOs服务器nginx重启

nginx重启失败

最稳妥的方法是:

先查看你的nginx.conf配置的端口  我的是443 

netstat -ntlp|grep 443

这里会出现这样的

这里红框标注的是占用的进程号

使用 

kill -9 4037

杀掉进程

接着使用

nginx -c /etc/nginx/nginx.conf

先启动nginx.conf

再使用  这个命令重启

nginx -s reload

nginx开机启动项

chkconfig nginx on
发布了55 篇原创文章 · 获赞 32 · 访问量 12万+

猜你喜欢

转载自blog.csdn.net/qq_41542894/article/details/86597417