Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

When I restart httpd, I get the following error. What am I missing?

[root@localhost ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd: Syntax error on line 22 of /etc/httpd/conf.d/sites.conf:
Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration

I have installed mod_ssl using yum install mod_ssl openssh

Package 1:mod_ssl-2.2.15-15.el6.centos.x86_64 already installed and latest version
Package openssh-5.3p1-70.el6_2.2.x86_64 already installed and latest version

My sites.conf looks like this

<VirtualHost *:80>
#    ServerName

    DocumentRoot /var/www/html/magento
    <Directory /var/www/html>
        Options -Indexes
        AllowOverride All

    ErrorLog logs/shop-error.log
    CustomLog logs/shop-access.log

<VirtualHost *:443>

    SSLEngine on
    SSLCertificateFile /etc/httpd/ssl/
    SSLCertificateKeyFile /etc/httpd/ssl/
    SSLCertificateChainFile /etc/httpd/ssl/

    DocumentRoot /var/www/html/magento
    <Directory /var/www/html>
        Options -Indexes
        AllowOverride All

    ErrorLog logs/shop-ssl-error.log
    CustomLog logs/shop-ssl-access.log    
share|improve this question

2 Answers 2

up vote 13 down vote accepted

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/

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.

share|improve this answer

On Debian systems, run the following command to enable Apache's SSL mod:

sudo a2enmod ssl
share|improve this answer
This is Debian-specific but the question is not tagged Debian. – jordanm Feb 18 at 1:32
is a2enmod really Debian specific? Or are you complaining about the use of sudo? – Stéphane Feb 18 at 2:08
a2enmod is Debian specific. It manages symlinks for the way Debian splits apache configurations. Your command is the equivalent of ln -s /etc/apache2/mods-{available,enabled}/ssl.load; ln -s /etc/apache2/mods-{available,enabled}/ssl.conf – jordanm Feb 18 at 3:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.