using:
CentOS release 4.5 (Final)
Server version: Apache/1.3.37 (Unix)
You can get this error for lots of reasons (including the mod_ssl.c module not being loaded) but my problem to day was the above error spat out by:
apachectl configtest
The reason is that apachectl DOES NOT define SSL (i.e. when it’s checking the config file). Therefore the httpd.conf will ALWAYS look broken if mod_ssl.c specific directives are in it. That is unless they are bracketed with:
<IfDefine SSL> or <IfModule mod_ssl.c>
in which case what’s the point of using “apachectl configtest” to test the config file?
httpd -S
gives the same error unless you also pass -DSSL like this:
httpd -S -DSSL
Be safe: use the actual boot scripts to stop and start the server if you’re using SSL:
/etc/init.d/httpd stop
/etc/init.d/httpd startssl