报错解决2

1、

nginx: [error] open() "/var/run/nginx.pid" failed (2: No such file or directory)


解决:

[root@TEST nginx]# sudo nginx -c /etc/nginx/nginx.conf
[root@TEST nginx]# nginx -s reload




2、

[root@nginx nginx]# curl http://127.0.0.1:8089
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.12.2</center>
</body>
</html>



解决:

nginx的端口开了, 远端的防火墙关了就可以







3、

[root@nginx conf.d]# !n
nginx -s reload
nginx: [alert] kill(2692, 1) failed (3: No such process)


解决;

[root@nginx conf.d]# whereis nginx
nginx: /etc/nginx /usr/local/sbin/nginx /usr/local/nginx
[root@nginx conf.d]# /usr/local/sbin/nginx 
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:58016 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:58016 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:58016 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:58016 failed (98: Address already in use)


端口冲突了,修改下端口;  然后杀掉,58016这个进程, 再重启nginx

 

posted @ 2018-11-24 16:12  effortsing  阅读(288)  评论(0编辑  收藏  举报