nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Not really a tutorial, but more about solving problem.
Problem : Try to start nginx after a hard reboot and got this error message
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
After some investigation, apparently it was caused by a process which is already using port 80.
Later on, I found out that it was caused by auto start of nginx.
To fix this problem, just stop nginx
service nginx stop
and restart nginx
service nginx start
this solved my problem. However,in case it is not caused by nginx. You can do this
sudo fuser -k 80/tcp
to kill the process that hogged port 80.
Oh! Before killing the process. Make sure you know which process it is first!
See also : Nginx + FastCGI + Go Setup.
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+6.6k Mac OSX : Find large files by size
+26.5k Golang : Find files by extension
+9.5k Golang : interface - when and where to use examples
+10.5k Golang : Get currencies exchange rates example
+24.2k Golang : How to print rune, unicode, utf-8 and non-ASCII CJK(Chinese/Japanese/Korean) characters?
+15k Golang : Get timezone offset from date or timestamp
+17.3k Golang : Parse date string and convert to dd-mm-yyyy format
+12.7k Golang : Get terminal width and height example
+6.9k Golang : Transform lisp or spinal case to Pascal case example
+4.4k Adding Skype actions such as call and chat into web page examples
+12k Golang : Flush and close file created by os.Create and bufio.NewWriter example