Author Topic: Apache won't start because it is trying to get localhost.crt  (Read 2131 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Apache won't start because it is trying to get localhost.crt
« on: April 30, 2022, 04:05:18 AM »
Apache on my server won't start because /etc/httpd/conf.d/ssl.conf is trying to get /etc/pki/tls/certs/localhost.crt which doesn't exist.

Apache logs:
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sat 2022-04-30 03:51:20 UTC; 2s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 5335 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 5335 (code=exited, status=1/FAILURE)

Apr 30 03:51:20 cwp.johnbdev.cf systemd[1]: Starting The Apache HTTP Server...
Apr 30 03:51:20 cwp.johnbdev.cf httpd[5335]: AH00526: Syntax error on line 100 of /etc/httpd/conf.d/ssl.conf:
Apr 30 03:51:20 cwp.johnbdev.cf httpd[5335]: SSLCertificateFile: file '/etc/pki/tls/certs/localhost.crt' does not exist or is empty
Apr 30 03:51:20 cwp.johnbdev.cf systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Apr 30 03:51:20 cwp.johnbdev.cf systemd[1]: Failed to start The Apache HTTP Server.
Apr 30 03:51:20 cwp.johnbdev.cf systemd[1]: Unit httpd.service entered failed state.
Apr 30 03:51:20 cwp.johnbdev.cf systemd[1]: httpd.service failed.

Offline
****
Re: Apache won't start because it is trying to get localhost.crt
« Reply #1 on: April 30, 2022, 05:03:41 AM »
apache should be in /usr/local/apache

so you had a previous version of apache installed before you installed CWP.  The directions clearly state that you must have a clean install OS with NO software installed.

On a side note, you can simply "mv /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.bak"
Google Hangouts:  rcschaff82@gmail.com

Offline
*
Re: Apache won't start because it is trying to get localhost.crt
« Reply #2 on: April 30, 2022, 07:50:59 PM »
I installed on a clean OS, it was the first thing I installed. I did in the past switch to Nginx but I had switched back to Apache.
The command you said did work. Thank you.
« Last Edit: April 30, 2022, 07:54:59 PM by JohnB17 »