nginx 启动报错:Job for nginx.service failed because the control process exited with error code
https://blog.csdn.net/a1007720052/article/details/82255226
根据提示输入命令:
systemctl status nginx.service
端口被占用,没仔细看,卸载,重装……还是不行。
然后……
https://blog.csdn.net/zqinghai/article/details/73484394
版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/zqinghai/article/details/73484394
centos6.5,启动nginx服务,无法开启,导致网页打不开。把服务从起一下发现提示错误如下:
Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 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:80 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:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
问题描述:地址已被使用。可能nginx服务卡死了,导致端口占用,出现此错误。
查看端口
netstat -ntpl
[root@localhost /]# netstat -ntpl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:58819 0.0.0.0:* LISTEN 2094/rpc.statd
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 5060/mysqld
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 2294/vsftpd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2271/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2121/cupsd
tcp 0 0 :::23527 :::* LISTEN 2094/rpc.statd
tcp 0 0 :::80 :::* LISTEN 2347/httpd
tcp 0 0 :::22 :::* LISTEN 2271/sshd
tcp 0 0 ::1:631 :::* LISTEN 2121/cupsd
kill 2347
[root@localhost /]# service nginx start
Starting nginx: [ OK ]
[root@localhost /]# ps -ef|grep nginx
root 2816 1 0 11:03 ? 00:00:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
nobody 2817 2816 0 11:03 ? 00:00:00 nginx: worker process
nobody 2818 2816 0 11:03 ? 00:00:00 nginx: worker process
nobody 2819 2816 0 11:03 ? 00:00:00 nginx: worker process
nobody 2820 2816 0 11:03 ? 00:00:00 nginx: worker process
root 2823 2732 0 11:03 pts/0 00:00:00 grep nginx
---------------------
版权声明:本文为CSDN博主「zqinghai」的原创文章,遵循CC 4.0 by-sa版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/zqinghai/article/details/73484394