Home > other >  Nginx restart failed
Nginx restart failed

Time:10-06

Use yum to install nginx/1.16.1 centos7 system, to restart operations (systemctl restart nginx) times wrong: check the error message (systemctl status nginx) . The selinux, closed by a firewall

CodePudding user response:

The nginx start that a few words of translation, to know

CodePudding user response:

1, the temporary closure of firewall
Systemctl stop firewalld
2, the temporary closure of selinux
Setenforce 0
3, check the port 80
Lsof - I: 80 (e.g., didn't find the lsof command, yum - y install lsof)
4, such as display port to kill a process
Kill 9 PID (digital)
5, restart nginx service
Systemctl restart nginx
Or/usr/locad/nginx/sbin/nginx

CodePudding user response:

How to also have to stick a configuration file out

CodePudding user response:

Assume that as you speak, selinu and firewall restrictions have been confirmed, then send the nginx log, since nginx is the internal error, just priority nginx procedures under the internal exception error.

CodePudding user response:

This error has been obvious, address already in use, means any other service your nginx port, so the service can't start, if your nginx is 80 by default, you can use this command ss - NTLP | grep 80 see what services are in use port 80, then to stop him or to kill, and if your nginx is other ports, also go and see who the port was used according to the approach,

CodePudding user response:

You this tip is port being used, use lsof - I: have a look at who is in use port 80, 80 cannot kill the change path nginx port in/usr/local/nginx/conf/nginx server or the location of the conf module
  • Related