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
+4.8k Golang : How to fix html/template : "somefile" is undefined error?
+5k Golang : Warp text string by number of characters or runes example
+35.4k Golang : Comparing date or timestamp
+21.5k Golang : Check if element exist in map
+6.6k Golang : Gonum standard normal random numbers example
+3.6k Fix Google Analytics Redundant Hostnames problem
+10.2k Golang : How to display image file or expose CSS, JS files from localhost?
+7.8k Golang : Copy map(hash table) example
+19.5k Golang : Convert(cast) string to rune and back to string example
+18.6k Golang : Print leading(padding) zero or spaces in fmt.Printf?
+16.6k Golang : Check if os.Stdin input data is piped or from terminal
+27k Golang : Remove characters from string example