I'm working on setting up a VPS with a Rails 3.1 application using nginx+passenger, and capistrano to boot strap it. At first, I installed nginx using a binary, forgetting that passenger installs it as well. When passenger asked me, I created a directory ~/opt/nginx for it to install into. Now, when I run the following:
sudo /etc/init.d/nginx stop lsof -i:80
The server seems to stop, and nothing reports back at port 80. However, I then try to run
And it says:
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Any ideas what's going on? Note that I installed nginx this way because I am using a user rvm install, and therefore using
sudo passenger-install-nginx-module would specify the wrong version of ruby.