apache2 Invalid command 'SSLEngine'

On many systems (Ubuntu, Suse, Debian, ...) run the following command to enable Apache's SSL mod:

sudo a2enmod ssl

a2enmod man page


Probably you do not load the ssl module. You should have a LoadModule directive somewhere in your apache configuration files.

Something like:

LoadModule ssl_module /usr/lib64/apache2-prefork/mod_ssl.so

Usually apache configuration template has (on any distribution) a file called (something like) loadmodule.conf in which you should find a LoadModule directive for each module you load into apache at server start.


On CentOS 7 installing the package "mod_ssl" and restarting the apache server worked for me:

yum install mod_ssl
systemctl restart httpd