0

I tried to do systemctl start apache2, then it shows no error. But when I check its status, it’s still inactive. How to resolve this? The output of the status follows:

    apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: inactive (dead) since Tue 2020-02-11 12:56:44 +04; 3s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 3372 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 3356 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)

Feb 11 12:56:44 hadoop-HP-Pro3500-Series apache2[3356]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Feb 11 12:56:44 hadoop-HP-Pro3500-Series apache2[3356]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Feb 11 12:56:44 hadoop-HP-Pro3500-Series apache2[3356]: no listening sockets available, shutting down
Feb 11 12:56:44 hadoop-HP-Pro3500-Series apache2[3356]: AH00015: Unable to open logs
Feb 11 12:56:44 hadoop-HP-Pro3500-Series apache2[3356]: Action 'start' failed.
Feb 11 12:56:44 hadoop-HP-Pro3500-Series apache2[3356]: The Apache error log may have more information.
Feb 11 12:56:44 hadoop-HP-Pro3500-Series apache2[3356]:  *
Feb 11 12:56:44 hadoop-HP-Pro3500-Series apache2[3372]:  * Stopping Apache httpd web server apache2
Feb 11 12:56:44 hadoop-HP-Pro3500-Series apache2[3372]:  *
Feb 11 12:56:44 hadoop-HP-Pro3500-Series systemd[1]: Started LSB: Apache2 web server.
  • 1
    It seems that port 80 is already in use. may be an other process is using it. – Lety Feb 11 at 9:06
  • i have change the port number and it works fine. now, when i try to access my web-page via localhost , am getting the error : 403 - Forbidden. how to solve this? – Sanaya Feb 11 at 9:27
  • try to dig, there are many questions about 403 forbidden error. – Lety Feb 11 at 10:17
  • thank you for your helps, i have solve the problem. Actually, the port number i.e port 80 was commented in host file. i've uncommented it and restarted Apache.. it works fine now. – Sanaya Feb 11 at 17:19
2

The error shows that its not able to bind or use port 80. It happens when port 80 is being used by another process. Hence, please try changing the Apache port and the service should start. Note: If you have any firewall installed open this port in firewall as well.

A 403 status code indicates that the client cannot access the requested resource. It can also happen when no default directory index page is present or a .htaccess file is preventing access.

I'd suggest to check the Apache error logs to get the correct idea about the error which you are facing.

Not the answer you're looking for? Browse other questions tagged or ask your own question.