Invalid command 'SSLEngine' Centos

Solution 1:

There is probably some forgotten configuration in /etc/httpd/conf or /etc/httpd/conf.d. Find (grep SSL /etc/httpd/{conf,conf.d} -r) and destroy it or install ssl module for Apache:

yum install mod_ssl

Solution 2:

In my case I had mod_ssl installed but it was not enabled. To do this I ran:

sudo a2enmod ssl

Solution 3:

Check whether you have already loaded mod_ssl in the httpd.conf file:

LoadModule ssl_module modules/mod_ssl.so