Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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'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

sudo ~/opt/nginx/sbin/nginx

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.

share|improve this question

Did you run lsof with sudo?

Does this return anything listening on port 80?

netstat -an | grep LISTEN*

When you connect to port 80 do you get any message?

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .