Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Running: CentOS6 x64

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

Package 1:mod_ssl-2.2.15-15.el6.centos.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
up vote 7 down vote accepted

SSLEngine on won't work unless the ssl module itself is loaded. You should have a line that looks like LoadModule ssl_module modules/ somewhere.

In my installation, I have a file called /etc/httpd/conf.d/ssl.conf that specifies this LoadModule directive. That file is part of the mod_ssl package that you said you installed. Verify that the file is there, and that your primary httpd.conf file (typically /etc/httpd/conf/httpd.con) has a line that says something like Include conf.d/*.conf in it, so that all .conf files in /etc/httpd/conf.d are also read into the configuration.

(Oh, installing the openssh package is sort of irrelevant to getting SSL running in Apache)

share|improve this answer
i added the loadmodule line in httpd.conf and now its working hurrah!!! thanks cjc – Christian Feb 10 '12 at 15:13
that was a typo on ssh, meant to write ssl... have corrected :) – Christian Feb 11 '12 at 17:14
Apache downloads modules in alphabetical order, that's why sites.conf was downloaded before ssl.conf and that was the root of the issue – ALex_hha Feb 20 at 0:57

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.