Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nginx not starting after server reboot

Tags:

I've moved from a built-from-src nginx 1.2.6 installation to 1.4.1 on Ubuntu 13.04.

Installed via Ubuntu PPA, http://wiki.nginx.org/Install#Ubuntu_PPA. This all worked great.

Manually, I can reload/start/stop the service using

sudo service nginx <command> 

After server reboot, nginx isn't coming up on its own.

In my previous manual installation I had a hand-written Upstart script in /etc/init that worked fine. The PPA installation has setup a /etc/init.d/ script, so I'd like to stick with the PPA methods rather than hacking something in.

It may be that because I'm not deeply familiar with the service interface that there's something I'm missing.

I've also checked /var/log/nginx/access.log and error.log and see nothing recorded during the startup process.

What should I do to fix this?

like image 943
Geuis Avatar asked Jun 25 '13 00:06

Geuis


People also ask

Why is Nginx not starting?

If nginx does not start, look for the reason in the error log file logs\error. log . If the log file has not been created, the reason for this should be reported in the Windows Event Log. If an error page is displayed instead of the expected page, also look for the reason in the logs\error.

How long does Nginx take to restart?

Reloading in the panel (VPS and Dedicated Servers) Wait 5 minutes for it to rebuild the configuration file.

Do Nginx need restart after config change?

You need to reload or restart Nginx whenever you make changes to its configuration. The reload command loads the new configuration, starts new worker processes with the new configuration, and gracefully shuts down old worker processes.


1 Answers

sudo update-rc.d nginx enable worked for me.

like image 167
webjay Avatar answered Oct 02 '22 13:10

webjay