0

I reinstall Apache2 and if I type sudo systemctl status apache2 it goes

● apache2.service - The Apache HTTP Server


  Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: failed (Result: exit-code) since Thu 2021-09-30 10:31:41 KST; 1min 30s ago
 Main PID: -- (code=exited, status=0/SUCCESS)

 9월 30 10:31:41 -- systemd[1]: Starting The Apache HTTP Server...
 9월 30 10:31:41 -- apachectl[30008]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
 9월 30 10:31:41 -- apachectl[30008]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
 9월 30 10:31:41 -- apachectl[30008]: no listening sockets available, shutting down
 9월 30 10:31:41 -- apachectl[30008]: AH00015: Unable to open logs
 9월 30 10:31:41 -- apachectl[30008]: Action 'start' failed.
 9월 30 10:31:41 -- apachectl[30008]: The Apache error log may have more information.
 9월 30 10:31:41 -- systemd[1]: apache2.service: Control process exited, code=exited status=1
 9월 30 10:31:41 -- systemd[1]: apache2.service: Failed with result 'exit-code'.
 9월 30 10:31:41 -- systemd[1]: Failed to start The Apache HTTP Server.

I already tried remove and reinstall by sudo apt-get purge apache2 and sudo apt-get install apache2 but it keep says failed...

Please help me. Thank you.

lin
  • 23
  • 2
  • 5
  • "*Address already in use: AH00072: make_sock: could not bind to address [::]:80*" - something is already running on port 80. If you search for that error you will find many answers here. – Don't Panic Sep 30 '21 at 06:19
  • 1
    Does this answer your question? [Starting apache fails (could not bind to address 0.0.0.0:80)](https://stackoverflow.com/questions/10160339/starting-apache-fails-could-not-bind-to-address-0-0-0-080) – Don't Panic Sep 30 '21 at 06:21
  • Thank you for responding. I tried everything but something is wrong. after sudo netstat -ltnp | grep ':80' i can see something is already on port 80 However, even if i kill this by sudo kill -9 number, it keeps comes up with new number...and also if i enter my ip adress i can go to the website that i set before i delete apache...do you have any idea? Thank you. – lin Sep 30 '21 at 06:31
  • If you kill it and it restarts automatically, something is doing that. Eg maybe it is a Docker container configured to always restart, or maybe supervisord is managing it, or ...? You'll have to find out what is doing it, and disable it. Or uninstall it completely. – Don't Panic Sep 30 '21 at 06:49
  • It worked after uninstall nextcloud which i installed by snap. Thank you so much for helping me you saved my day. – lin Oct 01 '21 at 00:55

1 Answers1

0

I installed nextcloud by snap which is why i couldn't delete 80 port. After i tried sudo snap remove nextcloud i could restart apache2.

lin
  • 23
  • 2
  • 5