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.4k Golang : Calculate diameter, circumference, area, sphere surface and volume
+46.2k Golang : Marshal and unmarshal json.RawMessage struct example
+16.6k Golang : Read integer from file into array
+26.7k Golang : Force your program to run with root permissions
+16.3k CodeIgniter/PHP : Create directory if does not exist example
+6.8k Golang : Normalize email to prevent multiple signups example
+33.7k Golang : convert(cast) bytes to string
+13.6k Golang : Tutorial on loading GOB and PEM files
+19.7k Golang : Append content to a file
+5.4k PHP : Fix Call to undefined function curl_init() error
+4.7k Javascript : How to get width and height of a div?
+5.7k Golang : Markov chains to predict probability of next state example