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
+8.8k Golang : GMail API create and send draft with simple upload attachment example
+12.6k Golang : Send data to /dev/null a.k.a blackhole with ioutil.Discard
+26.7k Golang : Find files by extension
+7.1k Golang : Transform lisp or spinal case to Pascal case example
+35k Golang : Upload and download file to/from AWS S3
+13.7k Golang : How to determine if a year is leap year?
+30.8k Golang : Interpolating or substituting variables in string examples
+39k Golang : How to iterate over a []string(array)
+16.5k Golang : Merge video(OpenCV) and audio(PortAudio) into a mp4 file
+22.8k Golang : simulate tail -f or read last line from log file example
+8.7k Golang : Take screen shot of browser with JQuery example
+9.3k Golang : Find the length of big.Int variable example