Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got an Ubuntu 11.04 i386 server with Nginx 1.0.11. I'm also using this init.d script - the only one I've found. The server starts up well, but each time I'm trying to stop or restart it, the operation fails. It's particularly annoying since I'm working on the conf now and I have to terminate Nginx each time I want to reload the conf.

What can I do to fix this?

share|improve this question
Since you're not using the Ubuntu package (why?), you could just lift the init script from the Ubuntu package anyway? – Shane Madden Jan 13 '12 at 21:24
Well, Ubuntu packages tend to be slightly outdated, which isn't that good. Can I access just the correct script anyhow? – Hubert OG Jan 13 '12 at 23:31
Do you really need all features from latest version? If not, it's better to stick with (supported) ubuntu package. – rvs Jan 14 '12 at 10:58
The script you're using probably fails because stuff is in the wrong place, e.g., it's using /usr/local/nginx/nginx.conf or something, instead of the more standard /etc/nginx/nginx.conf. Are you actually running the script without reading it to ensure it makes sense? For that matter, the default Ubuntu init script may also fail because you installed nginx bits in weird (non-standard) places. Anyway, the right way to deal with this is to use the Nginx PPA package that Erik Dahlstrand mentions. It's up to date, and conforms to Ubuntu packaging standards. – cjc Jan 14 '12 at 14:08
up vote 3 down vote accepted

There is a perfectly updated Nginx PPA making the installation a breeze. I've blogged about it recently.

share|improve this answer
Welcome to Server Fault! While this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – freiheit Jan 14 '12 at 18:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.