nginx not starting after server reboot

Geuis picture Geuis · Jun 25, 2013 · Viewed 47.8k times · Source

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?

Answer

webjay picture webjay · Mar 24, 2015

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