Apache server not starting in terminal & also tried with xampp.run , services not starting… any one help me
$systemctl start httpd.service
Job for httpd.service failed because the control process exited with error code.
See "systemctl status httpd.service" and "journalctl -xeu httpd.service" for details.
$ systemctl status httpd.service
× httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
Active: failed (Result: exit-code) since Mon 2022-10-31 07:45:25 IST; 2min 24s ago
Docs: man:httpd.service(8)
Process: 69702 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 69702 (code=exited, status=1/FAILURE)
Status: "Reading configuration..."
CPU: 56ms
Oct 31 07:45:25 MerwickPc systemd[1]: Starting httpd.service - The Apache HTTP Server...
Oct 31 07:45:25 MerwickPc httpd[69702]: AH00558: httpd: Could not reliably determine the server's fully qualifi>
Oct 31 07:45:25 MerwickPc httpd[69702]: (2)No such file or directory: AH02291: Cannot access directory '/etc/ht>
Oct 31 07:45:25 MerwickPc httpd[69702]: (2)No such file or directory: AH02291: Cannot access directory '/etc/ht>
Oct 31 07:45:25 MerwickPc httpd[69702]: AH00014: Configuration check failed
Oct 31 07:45:25 MerwickPc systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Oct 31 07:45:25 MerwickPc systemd[1]: httpd.service: Failed with result 'exit-code'.
Oct 31 07:45:25 MerwickPc systemd[1]: Failed to start httpd.service - The Apache HTTP Server.
lines 1-19/19 (END)
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
Active: failed (Result: exit-code) since Mon 2022-10-31 07:45:25 IST; 2min 24s ago
Docs: man:httpd.service(8)
Process: 69702 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 69702 (code=exited, status=1/FAILURE)
Status: “Reading configuration…”
CPU: 56ms
Oct 31 07:45:25 MerwickPc systemd[1]: Starting httpd.service - The Apache HTTP Server…
Oct 31 07:45:25 MerwickPc httpd[69702]: AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using 192.168.1.6. Set the ‘ServerName’ directive globally to suppress this message
Oct 31 07:45:25 MerwickPc httpd[69702]: (2)No such file or directory: AH02291: Cannot access directory ‘/etc/httpd/logs/’ for main error log
Oct 31 07:45:25 MerwickPc httpd[69702]: (2)No such file or directory: AH02291: Cannot access directory ‘/etc/httpd/logs/’ for error log of vhost defined at /etc/httpd/conf.d/ssl.conf:56
Oct 31 07:45:25 MerwickPc httpd[69702]: AH00014: Configuration check failed
Oct 31 07:45:25 MerwickPc systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Oct 31 07:45:25 MerwickPc systemd[1]: httpd.service: Failed with result ‘exit-code’.
Oct 31 07:45:25 MerwickPc systemd[1]: Failed to start httpd.service - The Apache HTTP Server.
~
~
~
~
lines 1-19/19 (END)
These seem to say what the error is quite clearly—not sure why it’s looking at /etc/httpd/logs/ for the error logs, though—it should either be using systemctl or logging in /var/log/, or so I thought.
It is common that the user edit /etc/httpd/conf/httpd.conf and fill in the appropriate data there. It is also a very good idea to have the FQDN in the /etc/hostname file so the machine can be properly identified to the httpd daemon. I am not 100% certain which or both will solve the issue, but that seems the source of your error.