I am trying to troubleshoot a duplicate listen options error that only happens on one server and not the other.
From docs at http://nginx.org/en/docs/http/ngx_http_core_module.html backlog listen directive works for each ip:port pair so I should be able to set backlog directive on listen directive once on port 80 and once on port 443. But on one server I am not able to and can't see where the problem is coming from ? How shall I debug this ?
--- working ---
On working Nginx 1.17.0 server I have 2 nginx vhosts that set backlog properly and have not problems
vhost 1
listen 80 default_server backlog=2048 reuseport fastopen=256;
vhost 2
listen 443 ssl http2 reuseport backlog=2048;
--- not working ---
Now on another Nginx 1.17.0 server I have 3 nginx vhosts but nginx restarts complain of duplicate listen options once I add vhost 3 and the error is related for vhost 2's listen directive
nginx: [emerg] duplicate listen options for 0.0.0.0:443 in /path/to/vhost2/vhost
vhost 1
listen 80 default_server backlog=4095 reuseport fastopen=256;
vhost 2
listen 443 ssl http2 reuseport;
vhost 3
listen 443 ssl http2 backlog=4095;
if i remove vhost 3 backlog=4095 directive there's no error though ?
--- working ---
Now if I reverse it so backlog=4095 is set in vhost 2 and not vhost 3, then it works and nginx doesn't complain of errors ? No idea why that is the case or if it's a bug ?
vhost 2
listen 443 ssl http2 reuseport backlog=4095;
vhost 3
listen 443 ssl http2;