【Failed to start nginx - high performance web server.】

If this error is reported when starting nginx, you generally need to go to the log directory of the nginx installation to view the error log file error.log. We can further troubleshoot the errors that occur in nginx.

cat /nginx/logs/error.log 

Found an error:

> bind() to 0.0.0.0:8000 failed (98: Address already in use)still could not bind()

1. Find the process occupying the port

lsof -i:8000

2. Use the kill command to kill the process.

kill -9 pid

3. Restart Nginx

systemctl restart nginx

Guess you like

Origin blog.csdn.net/kelekele111/article/details/127545262