[SOLVED] Failed to start The Apache HTTP Server

Adithyansm

Active Member
Joined
Nov 11, 2021
Messages
226
Reaction score
99
Credits
1,625
HELLO guy's:)

I am unable to start apache2 server in my zorin os lite machine
Code:
systemctl status apache2.service

● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2022-02-10 12:54:09 IST; 5min ago
       Docs: https://httpd.apache.org/docs/2.4/

Feb 10 12:54:09 zorinos apachectl[57554]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, us>
Feb 10 12:54:09 zorinos apachectl[57554]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Feb 10 12:54:09 zorinos apachectl[57554]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Feb 10 12:54:09 zorinos apachectl[57554]: no listening sockets available, shutting down
Feb 10 12:54:09 zorinos apachectl[57554]: AH00015: Unable to open logs
Feb 10 12:54:09 zorinos apachectl[57542]: Action 'start' failed.
Feb 10 12:54:09 zorinos apachectl[57542]: The Apache error log may have more information.
Feb 10 12:54:09 zorinos systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Feb 10 12:54:09 zorinos systemd[1]: apache2.service: Failed with result 'exit-code'.
Feb 10 12:54:09 zorinos systemd[1]: Failed to start The Apache HTTP Server.

Code:
systemctl start apache2.service

Authentication is required to start 'apache2.service'.
Authenticating as: adithyan,,, (adithyan)
Password:
==== AUTHENTICATION COMPLETE ===
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.

the ufw fire wall port 80 is allowed for apache and there is a seperate rule for apache also

Code:
 sudo ufw status
 
 Apache (v6)                ALLOW       Anywhere (v6)
 
 80/tcp (v6)                ALLOW       Anywhere (v6)

I have also reinstalled apache but no use

Zorin os lite (xfce)
4 GB ram

Please help me how to solve the issue it would be a great help:)
 
Last edited:


Try starting apache and then running what is mentioned.
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
If that doesn't provide anything useful try running the following.
Code:
apachectl configtest
 
Try starting apache and then running what is mentioned.

If that doesn't provide anything useful try running the following.
Code:
apachectl configtest
I want to host apache locally in my home network (want to make clear )
Code:
apachectl configtest

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
 
What's the output of the following after you trying starting apache.
Code:
systemctl status apache2
journalctl -u apache2
 
What's the output of the following after you trying starting apache.
Code:
systemctl status apache2
journalctl -u apache2
Code:
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor prese>
     Active: failed (Result: exit-code) since Thu 2022-02-10 13:45:06 IST; 11s >
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 62775 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/F>


Feb 10 13:45:06 zorinos apachectl[62778]: AH00558: apache2: Could not reliably >
Feb 10 13:45:06 zorinos apachectl[62778]: (98)Address already in use: AH00072: >
Feb 10 13:45:06 zorinos apachectl[62778]: (98)Address already in use: AH00072: >
Feb 10 13:45:06 zorinos apachectl[62778]: no listening sockets available, shutt>
Feb 10 13:45:06 zorinos apachectl[62778]: AH00015: Unable to open logs
Feb 10 13:45:06 zorinos apachectl[62775]: Action 'start' failed.
Feb 10 13:45:06 zorinos apachectl[62775]: The Apache error log may have more in>
Feb 10 13:45:06 zorinos systemd[1]: apache2.service: Control process exited, co>
Feb 10 13:45:06 zorinos systemd[1]: apache2.service: Failed with result 'exit-c>
Feb 10 13:45:06 zorinos systemd[1]: Failed to start The Apache HTTP Server


journalctl -u apache2
Code:
 journalctl -u apache2
-- Logs begin at Thu 2022-02-10 08:28:13 IST, end at Thu 2022-02-10 13:46:21 IS>
Feb 10 08:28:30 zorinos systemd[1]: Starting The Apache HTTP Server...
Feb 10 08:28:37 zorinos apachectl[936]: AH00558: apache2: Could not reliably de>
Feb 10 08:28:37 zorinos apachectl[936]: (2)No such file or directory: AH02291: >
Feb 10 08:28:37 zorinos apachectl[936]: (2)No such file or directory: AH02291: >
Feb 10 08:28:37 zorinos apachectl[936]: AH00014: Configuration check failed
Feb 10 08:28:37 zorinos apachectl[916]: Action 'start' failed.
Feb 10 08:28:37 zorinos apachectl[916]: The Apache error log may have more info>
Feb 10 08:28:37 zorinos systemd[1]: apache2.service: Control process exited, co>
Feb 10 08:28:37 zorinos systemd[1]: apache2.service: Failed with result 'exit-c>
Feb 10 08:28:37 zorinos systemd[1]: Failed to start The Apache HTTP Server.
Feb 10 12:45:50 zorinos systemd[1]: Starting The Apache HTTP Server...
Feb 10 12:45:51 zorinos apachectl[55545]: AH00558: apache2: Could not reliably >
Feb 10 12:45:51 zorinos apachectl[55545]: (2)No such file or directory: AH02291>
Feb 10 12:45:51 zorinos apachectl[55545]: (2)No such file or directory: AH02291>
Feb 10 12:45:51 zorinos apachectl[55545]: AH00014: Configuration check failed
Feb 10 12:45:51 zorinos apachectl[55542]: Action 'start' failed.
Feb 10 12:45:51 zorinos apachectl[55542]: The Apache error log may have more in>
Feb 10 12:45:51 zorinos systemd[1]: apache2.service: Control process exited, co>
Feb 10 12:45:51 zorinos systemd[1]: apache2.service: Failed with result 'exit-c>
Feb 10 12:45:51 zorinos systemd[1]: Failed to start The Apache HTTP Server.
Feb 10 12:54:07 zorinos systemd[1]: Starting The Apache HTTP Server...
Feb 10 12:54:09 zorinos apachectl[57554]: AH00558: apache2: Could not reliably >
lines 1-23...skipping...
-- Logs begin at Thu 2022-02-10 08:28:13 IST, end at Thu 2022-02-10 13:46:21 IST. --
Feb 10 08:28:30 zorinos systemd[1]: Starting The Apache HTTP Server...
Feb 10 08:28:37 zorinos apachectl[936]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, usin>
Feb 10 08:28:37 zorinos apachectl[936]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main e>
Feb 10 08:28:37 zorinos apachectl[936]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for error >
Feb 10 08:28:37 zorinos apachectl[936]: AH00014: Configuration check failed
Feb 10 08:28:37 zorinos apachectl[916]: Action 'start' failed.
Feb 10 08:28:37 zorinos apachectl[916]: The Apache error log may have more information.
Feb 10 08:28:37 zorinos systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Feb 10 08:28:37 zorinos systemd[1]: apache2.service: Failed with result 'exit-code'.
Feb 10 08:28:37 zorinos systemd[1]: Failed to start The Apache HTTP Server.
Feb 10 12:45:50 zorinos systemd[1]: Starting The Apache HTTP Server...
Feb 10 12:45:51 zorinos apachectl[55545]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, us>
Feb 10 12:45:51 zorinos apachectl[55545]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main>
Feb 10 12:45:51 zorinos apachectl[55545]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for erro>
Feb 10 12:45:51 zorinos apachectl[55545]: AH00014: Configuration check failed
Feb 10 12:45:51 zorinos apachectl[55542]: Action 'start' failed.
Feb 10 12:45:51 zorinos apachectl[55542]: The Apache error log may have more information.
Feb 10 12:45:51 zorinos systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Feb 10 12:45:51 zorinos systemd[1]: apache2.service: Failed with result 'exit-code'.
Feb 10 12:45:51 zorinos systemd[1]: Failed to start The Apache HTTP Server.
Feb 10 12:54:07 zorinos systemd[1]: Starting The Apache HTTP Server...
Feb 10 12:54:09 zorinos apachectl[57554]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, us>
Feb 10 12:54:09 zorinos apachectl[57554]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Feb 10 12:54:09 zorinos apachectl[57554]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Feb 10 12:54:09 zorinos apachectl[57554]: no listening sockets available, shutting down
Feb 10 12:54:09 zorinos apachectl[57554]: AH00015: Unable to open logs
Feb 10 12:54:09 zorinos apachectl[57542]: Action 'start' failed.
Feb 10 12:54:09 zorinos apachectl[57542]: The Apache error log may have more information.
Feb 10 12:54:09 zorinos systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Feb 10 12:54:09 zorinos systemd[1]: apache2.service: Failed with result 'exit-code'.
 
Feb 10 08:28:37 zorinos apachectl[936]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main e>
Feb 10 08:28:37 zorinos apachectl[936]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for error >
Run the following and share the output.
Code:
ls -l  /var/log | grep apache
If you get no output run the following.
Code:
sudo mkdir /var/log/apache2
Then try starting apache again.
 
Moving this to General Server, where it will be better placed.

Good luck.

Chris Turner
wizardfromoz
 
In some distro's, I have had to set the listen directive in httpd.conf.

I had to change...

Listen 80

to

Listen 10.10.10.10:80

(Obviously you will have a different IP address)
 
Thank you all for your replies but the problem is solved by reinstalling apache2 and doing a restart the server started automatically:)
 

Members online


Top