Page 1 of 1

nginx: [emerg] bind() to :80 failed (99: Cannot assign requested address)

Posted: Sat May 04, 2019 2:45 pm
by boggsy
Hi Guys

I'm having a little bit problem for this server.

Previously we have updated the server to new IP and having error to start the nginx service.

We have removed the old IP setting:

# rm -rf /etc/nginx/conf.d/IP.conf
# rm -rf /etc/httpd/conf.d/IP.conf

But still nginx not able to start.

Besides that, there is no other application listening to port 80.

Please help us on this.

Thank you

Re: nginx: [emerg] bind() to :80 failed (99: Cannot assign requested address)

Posted: Sat May 04, 2019 8:37 pm
by dreiggy
Hi,

create back those files which you have removed:

# touch /etc/nginx/conf.d/IP.conf
# touch /etc/httpd/conf.d/IP.conf

httpd IP.conf content:

Code: Select all

Listen IP:8080
Listen IP:8443
nginx IP.conf content:

Code: Select all

server {
    listen       IP:80 default;
    server_name  _;
    #access_log  /var/log/nginx/IP.log main;
    location / {
        proxy_pass  http://IP:8080;
   }
}
And then restart httpd and nginx.