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
+10.7k Golang : Removes punctuation or defined delimiter from the user's input
+6.2k Golang : Selection sort example
+14k Golang : Check if a file exist or not
+21.9k Fix "Failed to start php5-fpm.service: Unit php5-fpm.service is masked."
+16.1k Golang : convert string or integer to big.Int type
+23.6k Golang : Fix type interface{} has no field or no methods and type assertions example
+10k Golang : Use regular expression to get all upper case or lower case characters example
+18.3k Golang : Example for RSA package functions
+9.8k Golang : Sort and reverse sort a slice of integers
+15k Golang : Save(pipe) HTTP response into a file
+10.4k RPM : error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
+12.4k Golang : Forwarding a local port to a remote server example