Skip to content

Instantly share code, notes, and snippets.

@pkarl
Created September 3, 2010 14:58
Show Gist options
  • Save pkarl/563984 to your computer and use it in GitHub Desktop.
Save pkarl/563984 to your computer and use it in GitHub Desktop.
# try to start apache, receive error
~: sudo /etc/init.d/apache2 start
* Starting web server apache2
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:8080
no listening sockets available, shutting down
Unable to open logs
...fail!
# see what's using the port (note that I'm searching for :80, I could also use :8080)
~: sudo netstat -tulpn| grep :80
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 29004/apache2
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 28964/nginx
# I see that apache2 is using 8080! Kill it!
~: killall -9 apache2
# Let's try again, with success
~: sudo /etc/init.d/apache2 start
* Starting web server apache2
...done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment