Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


autossl and nginx issue
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

autossl and nginx issue

Hi,

It seems, autossl facility do not work well with nginx web server. We needed to restart nginx each time to apply autossl changes in cpanel server,

recently , eventhough we installed ssl for a domain , it shows warnings in browser and we have restarted nginx, but got the following error

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

On restarting nginx , give this error and later found out named was stopped

restarted named service and yet nginx gave the same error

The fix was we need to edit the file /etc/sysctl.conf

add the following line

net.ipv4.ip_nonlocal_bind = 1

This will tell our server to allow processes to bind to the non-local addresses

Then reload the sysctl conf

sysctl -p /etc/sysctl.conf

What just happened is while rebooting the server few days before , it didnt bind automatically to the Ip address, so after adding this directive , the system will allow processes to bind non-local ip addresses.

then started nginx

we could see ssl is showing on that domain.

Sign In or Register to comment.