Server Fault is a question and answer site for system and network administrators. 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

Whenever I try to start nginx I get the following output.

/etc/init.d/nginx start
Starting nginx: [emerg]: bind() to [::]:80 failed (98: Address already in use)
[emerg]: bind() to [::]:80 failed (98: Address already in use)
[emerg]: bind() to [::]:80 failed (98: Address already in use)
[emerg]: bind() to [::]:80 failed (98: Address already in use)
[emerg]: bind() to [::]:80 failed (98: Address already in use)
[emerg]: still could not bind()

However, nothing is listening on port 80. I get nothing when I run lsof -i :80

I'm also running php-fpm which I thought might have something to do with it but as I said, lsof doesn't indicate that php-fpm is related.

Does anyone have any idea what to look for?

share|improve this question
What does netstat -tanp show? What do you get if you telnet to port 80? – David Jul 11 '11 at 3:13
Nothing for port 80 in netstat or telnet. – Darrell Brogdon Jul 11 '11 at 3:23
Can you post your config? – David Jul 11 '11 at 3:26

Try starting nginx manually at the command line and see if you have the same problem. Try it with a clean config file and slowly add your changes. Maybe it's as simple as a configuration issue.

share|improve this answer

Pretty obvious, but you never know: are you starting this as root or via sudo? Only root can bind to ports < 1024.

share|improve this answer
Trying to bind to a privileged port as a non-root user gives EACCES, not EADDRINUSE. – womble Jul 11 '11 at 6:25

Turns out it was a problem with the config file. Kind-of disturbed that a config file problem reports as an unrelated inability to bind to a port.

share|improve this answer
What kind of a problem? Can you please post what options in your config file were causing such behaviour? – Alexander Azarov Jul 11 '11 at 9:13

My guess is that Apache is taking it. I'm pretty sure that PHP cannot run without it. I'm not very confident with PHP config. Here's a link that I found that may help.

I hope that this helps a little.

share|improve this answer
-1 No, PHP does not require Apache and that link has nothing to do with PHP requiring Apache, or even using Apache... – Chris S Jul 12 '11 at 12:39

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.