Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

When i add SSLEngine on into my vhost setup apache wont start... Any help would be great.

I am doing the following the following to setup SSL on my server:

yum install mod_ssl openssl

mkdir -m 700 -p $key_dir
echo "$SSL_KEY" > $key_dir/ca.key
echo "$SSL_CERTIFICATE" > $key_dir/ca.crt
echo "$SSL_INTERMEDIATE" > $key_dir/intermediate.crt
chmod 400 $key_dir/*

cp $key_dir/ca.crt /etc/pki/tls/certs
cp $key_dir/intermediate.crt /etc/pki/tls/certs
cp $key_dir/ca.key /etc/pki/tls/private/ca.key

The below is the virutal host I have placed at the bottom of /etc/httpd/conf.d/ssl.conf

<VirtualHost *:443>
        SSLEngine on
        SSLCertificateFile /etc/pki/tls/certs/ca.crt
        SSLCertificateKeyFile /etc/pki/tls/private/ca.key
        SSLCACertificateFile /etc/pki/tls/certs/intermediate.crt
        <Directory /home/webapps/xxxxxx/curret/webroot>
        AllowOverride All
        DocumentRoot /home/webapps/xxxxxx/current/webroot

With SSLEngine on apache wont start without it it works fine.

Any suggestions?


I just found this in the apache error log:

[Tue Mar 08 13:32:45 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Mar 08 13:32:45 2011] [error] Init: Private key not found
[Tue Mar 08 13:32:45 2011] [error] SSL Library Error: 218710120 error:0D094068:asn1 encoding routines:d2i_ASN1_SET:bad tag
[Tue Mar 08 13:32:45 2011] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
[Tue Mar 08 13:32:45 2011] [error] SSL Library Error: 218595386 error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error
[Tue Mar 08 13:32:45 2011] [error] SSL Library Error: 218734605 error:0D09A00D:asn1 encoding routines:d2i_PrivateKey:ASN1 lib

But the key exists and matches the location in the vhost setup

share|improve this question
can you post the error message that you get when you restart httpd ? – Vamsi Mar 8 '11 at 13:33
I don't get an error message.. But just found error in apache error log - see updated answer – icelizard Mar 8 '11 at 13:36

I fixed it...

I had somehow managed to have the CSR contents as the contents of the KEY file!! Silly me

share|improve this answer

When you create private key with passphrase, this may cause problem starting apache server.

DO NOT create private key with Passphrase..

share|improve this answer
Downvoting because this is wrong. The only effect of putting a passphrase on the private key is that you get prompted to enter the passphrase when you restart the server. – Andrew Schulman Dec 3 '14 at 10:28

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.