I've added a new SSL certificate to my nginx server (I've done this many times before). However, when I restart nginx, no sites are working.
When I run configtest, it says:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
If nginx is running and I run nginx reload, the sites and the new ssl certificate are working.
Only when Nginx restarts, I get following:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Stopping nginx: [ OK ]
Starting nginx:
So nothing happens after the Starting nginx. No message is written to the nginx error logs neither.
If I just use "start", often it does work.
What can I do to fix this and what could cause this?
lsof -Pni
as root show anything for port 443? Are there any other previous connections showing (FIN_WAIT etc). I would think that nginx would have reuse-address socket option enabled by default (I've not yet used it); bit I've been surprised by this before.