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 shop.itmanx.com
    ServerAdmin webmaster@itmanx.com

    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>
    ServerName secure.itmanx.com
    ServerAdmin webmaster@itmanx.com

    SSLEngine on
    SSLCertificateFile /etc/httpd/ssl/secure.itmanx.com/server.crt
    SSLCertificateKeyFile /etc/httpd/ssl/secure.itmanx.com/server.key
    SSLCertificateChainFile /etc/httpd/ssl/secure.itmanx.com/chain.crt

    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    

1 Answer 1


SSLEngine on won't work unless the ssl module itself is loaded. You should have a line that looks like LoadModule ssl_module modules/mod_ssl.so 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)

  • i added the loadmodule line in httpd.conf and now its working hurrah!!! thanks cjc
    – Christian
    Feb 10, 2012 at 15:13
  • that was a typo on ssh, meant to write ssl... have corrected :)
    – Christian
    Feb 11, 2012 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, 2016 at 0:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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