Page 1 of 1

nginx failing to restart since last night

Posted: Tue Dec 24, 2019 8:48 am
by youradds
I have a question open on SO:

https://serverfault.com/questions/99662 ... last-night

For some reason nginx is refusing to load up. The weird part is that `service nginx status` shows as inactive, yet the websites work! Is anyone else having this issue?

The server is latest Vesta, Ubuntu 16.0.4 , nginx, Apache2 (reverse proxy). I'm really stuck on what else to look at / check. If nginx wasn't booting at all, it would make more sense - but the fact it DOES seem to be running is confusing the hell out of me!

Thanks

Andy

Re: nginx failing to restart since last night

Posted: Thu Dec 26, 2019 4:49 am
by plutocrat
Does 'nginx -t' show any errors? It will test the nginx config.

nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Also another thing comes to mind ... Vesta CP uses two nginx processes. One as the proxy in front of apache (running on ports 80 / 443) and one as the server that runs Vesta (running on 8083). Perhaps one of these is failing and not the other?

Re: nginx failing to restart since last night

Posted: Thu Dec 26, 2019 7:07 am
by youradds
Thanks for the reply. -t showed no errors.

Weirdly though, after rebooting (for the 4th ort 5th time), it seems to have sorted itself out! I'll have to keep an eye on it and see if it happens again. The odd part was that both the websites, AND VestaCP admin were both working!

Re: nginx failing to restart since last night

Posted: Fri Dec 27, 2019 3:26 am
by plutocrat
Guess I should have suggested to try testing the vesta config too,
nginx -t -c /usr/local/vesta/nginx/conf/nginx.conf

But anyway it seems that all is good now.