Solved: Invalid command ‘SSLEngine

Better Stack Team
Updated on May 4, 2022


Apache refuses to start prompting Invalid command 'SSLEngine'Error'

Cause of the problem

This frequently happens on fresh Apache servers. When Apache starts it reads through the configuration files. When it encounters SSLEngine directive, it considers it as unknown. This is caused by the fact that the server’s basic configuration does not have mod_ssl module installed or enabled.


On CentOS/RedHat systems

Run the following command to install mod_ssl

sudo yum install mod_ssl

On Ubuntu/Debian systems

Run the following command to enable the module:

sudo a2enmod ssl

SSL module should be enabled by now.

Got an article suggestion? Let us know
Explore more
Licensed under CC-BY-NC-SA

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

We are hiring.

Software is our way of making the world a tiny bit better. We build tools for the makers of tomorrow.

Explore all positions →

Reliability is the
ultimate feature

Delightful observability tools that turn your logs & monitoring into a secret weapon for shipping better software faster.

Explore Better Stack