failure to listen on *:80; throws nginx: [emerg] bind() fail: (99: Cannot assign requested address)
using v3.0.5.1 on CentOS v6.3 64bit
Configuring nginx_vhost.conf.master template to dynamically populate the server directive with the domain address:port combination, and having no *.80; listener, causes the nginx server to throws the following exception on restart:
Starting nginx: nginx: [emerg] bind() to 206.188.192.191:80 failed (99: Cannot assign requested address)
My nginx_vhost.conf.master template is configured as follows:
server {
listen <tmpl_var name='domain'>:80;
<tmpl_if name='ipv6_enabled'>
listen [<tmpl_var name='domain'>]:80 ipv6only=on;
</tmpl_if>
<tmpl_if name='ssl_enabled'>
listen <tmpl_var name='domain'>:443 ssl;
<tmpl_if name='ipv6_enabled'>
listen [<tmpl_var name='domain'>]:443 ssl ipv6only=on;
</tmpl_if>
Previously, at least one domain vhost file had listened on *:80;
Modifying a single domain's vhost record to listen on *.80 will resolve this behavior.
While it seems this may be an nginx bug, rather than an ISPconfig bug, it is ISPconfig's behavior that serves to throw the exception. It isn't immediately clear how ISPconfig should manage the vhost rewrite facility to prevent this behavior from occuring. Since, ultimately, this scenario may play out for others using ISPconfig, it seemed appropriate to call attention to the behavior & offer some visibility to the seemingly random behavior that is exhibited.
Notice the IP address of the binding exception is "206.188.192.191", which somewhat randomly resolves to a NetworkSolutions server hosting 600+ domains.