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
+11.5k Golang : Basic authentication with .htpasswd file
+7.2k Golang : Natural string sorting example
+7.9k Golang : How to tokenize source code with text/scanner package?
+11k Golang : How to reverse elements order in map ?
+11.8k Golang : Set up source IP address before making HTTP request
+10.6k Golang : Submit web forms without browser by http.PostForm example
+4.8k Golang : Fibonacci number generator examples
+17.5k Golang : Sort and reverse sort a slice of strings
+20.4k Golang : How to declare kilobyte, megabyte, gigabyte, terabyte and so on?
+5.7k Gogland : Where to put source code files in package directory for rookie
+13.8k Golang : Find IP address from string
+16k Golang : Execute shell command