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

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

If you’re trying to start nginx, but it throws this error:

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

it would likely mean that the IP in question does not exist in your device.  Type the following to see which IPs are in your device:

/sbin/ifconfig

If your network was restarted, type:

service startips startIf, for whatever reason, the IPs cannot be loaded into the device but you must still have that IP in the nginx config, then you can set:
net.ipv4.ip_nonlocal_bind = 1

into your /etc/sysctl.conf file, and reboot.

Để lại một bình luận

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

This site uses Akismet to reduce spam. Learn how your comment data is processed.