New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
nginx failed to start after apt-get upgrade
fresher_06
Member
Recently if did an apt-get update and apt-get upgrade on my debian 6 VPS and after that the nginx started showing the below error
/etc/init.d/nginx restart
Restarting nginx: nginxnginx: [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)
>
it happens because if the new version of Nginx as 1.2.7
but i got the solution at http://www.ambidev.com/nginx-update-failed-on-debian/
Comments
I beg your pardon?
I have a suspicion that it's trying to bind to port 80, but something is already listening on that port.
netstat -lnp
should tell you what it is.@fresher_06
Openup your vhost config and replace the line that has something like,
with
This is required for ipv6 networking. Otherwise, simply comment out that line.
After that restart your nginx server.
?
edit
change
to
Why are people providing solutions? OP already did that. This is in the tutorial section.
@murky What I provided is a solution, what op posted is just a temp fix
Oh... Didn't realize.
as mentioned in the link .. i just renamed /etc/nginx/sites-available/default to default.old and it works .. also @NickM .. neither . netstat -antp , lsof -i , fuser -n tcp 80 , ps -ef | grep nginx , ps -ef | grep httpd gave me any sign that port 80 was bound by some other instance .. anyways . thanks a lot for everybody input ..
But the next nginx upgrade will probably drop another default file in there and the same thing will happen again.
Why not just remove the symlink at /etc/nginx/sites-enabled/default?
aka a2dissite default.