Nowadays SSL are a must for any website. But when you try to install the certificate, you may encounter the Invalid Command SSLEngine error. More specifically, it will surface when you create virtual host record for port 443. That’s when Apache wouldn’t start as intended and yield the following error message:
Why the Error Occurs?
Basically, there are two reasons behind the Invalid Command SSLEngine error. These are:
There are three ways you can fix this issue. These are:
If you’ve already installed it, run the below command to enable it:
For users on Apache 2.4, the module will be named mod24_ssl.
If you’re on a Debian-based distro, executing the following command will enable the module:
Now restart the Apache service using the following command:
Once the server starts, check the installation by running this command:
Execute this command for that purpose:
So go ahead and execute this command:
Or else, you can just install the SSL module.
These three solutions should fix the Invalid Command SSLEngine issue. For further assistance, get in touch with the hosting support team.
Code:
Invalid Command ‘SSLEngine’, perhaps misspelled or defined by a module not included in the server configuration
Action ‘start’ failed.
The Apache error log may have more information
Basically, there are two reasons behind the Invalid Command SSLEngine error. These are:
- When Apache starts, it will read the configurations files. That’s when it’ll come across the SSLEngine, which it treats as an unknown directive. The directive exists because you must have installed or enabled mod_ssl module in the configuration. If you’re unaware, SSLEngine is responsible for creating and serving SSL connections.
- The second reason is if you have configurations at /etc/httpd/conf or /etc/httpd/conf.d which you are not aware of, you may get the error.
There are three ways you can fix this issue. These are:
- Install mod_ssl
If you’ve already installed it, run the below command to enable it:
Code:
sudo yum install mod_ssl
If you’re on a Debian-based distro, executing the following command will enable the module:
Code:
sudo a2enmod ssl
Code:
sudo apachectl restart
Code:
openssl s_client -connect yourdomain.com:443
- Load the SSL Module
Execute this command for that purpose:
Code:
LoadModule ssl_module /usr/lib64/apache2-prefork/mod_ssl.so
- Delete the unnecessary configurations in the configuration file
So go ahead and execute this command:
Code:
grep SSL /etc/httpd/{conf,conf.d} -r
These three solutions should fix the Invalid Command SSLEngine issue. For further assistance, get in touch with the hosting support team.