Linode setup (Ubuntu 10.04 32bit) nginx won't start. 98: the address is already in use
Hi I have a little problem setting up linode with Railscast Ep instructions. # 335
My configuration for this server: Ubuntu 10.04 LTS Disk Image 32bit
I can go this far:
Both of these functions run as expected.
apt-get -y update
apt-get -y install curl git-core python-software-properties
When I go to the nginx steps:
add-apt-repository ppa:nginx/stable
apt-get -y update
apt-get -y install nginx
Up to this point, everything is working fine.
Here: service nginx start
I get the following in response:
* Starting nginx nginx
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
I have tried to stop, restart and restart nginx, but I cannot change anything. Any suggestions would be appreciated. Thanks in advance.
source to share
It seems that you have something else running or blocking this port. try running: sudo netstat -pan | grep ": 80"
which should give you a hint as to what is working there. It might be uwsgi / apache2 / tomcat etc. Perhaps there is a lot of work there.
EDIT:
Now I know what the problem is as I had it now on the debian server.
listen 80; ## listen for ipv4
listen [::]:80 default ipv6only=on; ## listen for ipv6
You have to comment out the first or second line (depending on whether you want to listen to ipv6 or ipv4. This was the problem I had.
source to share