3

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
  • 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
2

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
1

You need to install the mod_ssl package

  • It's already installed. – mike Mar 16 '10 at 2:49
0

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

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.