Unable to start nginx: (98: Address already in use) on plesk server

The following error occurs on attempt to start nginx service:

#systemctl start nginx
(98) Address already in use: make_sock: could not bind to address [::]:80

Apache is listening service listen on 80 port:

#netstat -tulpn | grep :80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 7424/httpd

In case IP address is used by nginx, just kill the hung nginx process.

Apache is configured to listen on port 80 in /etc/httpd/conf/httpd.conf file:

#grep Listen /etc/httpd/conf/httpd.conf
Listen 0.0.0.0:80

Log into the server via ssh.

Use any text editor to correct the Apache configuration files:

Before:

#grep -R Listen /etc/httpd/
/var/httpd/conf/httpd.conf:Listen 0.0.0.0:80

After:

#grep -R Listen /etc/httpd/
/var/httpd/conf/httpd.conf: Listen 0.0.0.0:8080

Now restart Apache service:

#systemctl restart httpd

Time to regenerate web configuration:

#plesk repair web -y

Now start nginx service again:

#systemctl start nginx .

Thank you for reading this article.

Was this helpful?

1 / 0

Leave a Reply 3

Your email address will not be published. Required fields are marked *


zortilol

zortilol

I got what you mean ,saved to favorites, very nice site.

leawake

leawake

Welcome, Thank you to share such good thing!

wessment

wessment

Your style is so unique compared to many other people. Thank you for publishing when you have the opportunity,Guess I will just make this bookmarked.2