Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Below is what my VirtualHosts look like in httpd.conf

<VirtualHost *:80>
  # Admin email, Server Name (domain name) and any aliases
  ServerAdmin support@mydomain.com
  ServerName  mydomain.com
  ServerAlias www.mydomain.com

  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.php
  DocumentRoot /home/mydomain/public_html/mydomain.com/public

  # Custom log file locations
  LogLevel warn
  ErrorLog  /home/mydomain/public_html/mydomain.com/log/error.log
  CustomLog /home/mydomain/public_html/mydomain.com/log/access.log combined
</VirtualHost>

<VirtualHost *:443>
  SSLEngine on
  SSLCertificateFile /etc/httpd/conf/ssl.crt/mydomain.com.crt
  SSLCertificateKeyFile /etc/httpd/conf/ssl.key/mydomain.com.key

  ServerName  mydomain.com
  DirectoryIndex index.php
  DocumentRoot /home/mydomain/public_html/mydomain.com/public

</VirtualHost>

I'm using the latest version of Apache on CentOS and there isn't any error being generated. Apache just will not start. Any ideas what I'm doing wrong?

UPDATE - Found these messages in the error log:

[Tue Mar 16 02:07:57 2010] [error] Init: Private key not found
[Tue Mar 16 02:07:57 2010] [error] SSL Library Error: 218710120 error:0D094068:asn1 encoding routines:d2i_ASN1_SET:bad tag
[Tue Mar 16 02:07:57 2010] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
[Tue Mar 16 02:07:57 2010] [error] SSL Library Error: 218595386 error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error
[Tue Mar 16 02:07:57 2010] [error] SSL Library Error: 218734605 error:0D09A00D:asn1 encoding routines:d2i_PrivateKey:ASN1 lib
share|improve this question
    
If you add the Log configuration to the VirtualHost *:443, do you get any more info ? –  Dominik Mar 16 '10 at 2:37
    
Did you resolve this issue? –  kim3er Jul 18 '11 at 14:09

3 Answers 3

It can not find /etc/httpd/conf/ssl.key/mydomain.com.key file.

In the logs you have:

[Tue Mar 16 02:07:57 2010] [error] Init: Private key not found

The related configuration is:

SSLCertificateKeyFile /etc/httpd/conf/ssl.key/mydomain.com.key
share|improve this answer

You need to install the mod_ssl package

share|improve this answer
    
It's already installed. –  mike Mar 16 '10 at 2:49

Does the SSLCertificateFile and SSLCertificateKeyFile exist? If they do, it looks like they're malformed.

share|improve this answer

Your Answer

 
discard

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.