1

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?

Hubert OG
  • 215
  • 1
  • 2
  • 6
  • 2
    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

1 Answers1

3

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

user337085
  • 123
  • 6
  • Welcome to Server Fault! While this may theoretically answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – freiheit Jan 14 '12 at 18:40