0

I'm trying to Restart Apache in AWS linux 2 (EC2 server).

When I run sudo systemctl restart httpd I get this issue

Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

And when I run systemctl status httpd.service I get

httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset
: disabled) Drop-In: /usr/lib/systemd/system/httpd.service.d └─php-fpm.conf Active: failed (Result: exit-code) since Sat 2023-01-14 10:13:55 UTC; 12s ago Docs: man:httpd.service(8) Process: 17925 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, s
tatus=1/FAILURE) Main PID: 17925 (code=exited, status=1/FAILURE)
Status: "Reading configuration..."

This happened when I try to add Configure SSL/TLS on Amazon Linux 2.

And I did commented this line in /etc/httpd/conf.d/ssl.conf

SSLCertificateKeyFile /etc/pki/tls/private/localhost.key 

1 Answer 1

0

Finally found out an answer by my self,

in /etc/httpd/conf.d/ssl.conf file it's created a line like,

SLCertificateFile /etc/pki/tls/certs/localhost.crt 

We need to change SLCertificateFile to SSLCertificateFile

SSLCertificateFile /etc/pki/tls/certs/localhost.crt 

Then run

sudo systemctl restart httpd 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.