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

I added the following code to my apache config file:

NameVirtualHost *:443

<VirtualHost *:443>
ServerName domain.com
DocumentRoot /var/www/html

SSLEngine ON
SSLCertificateFile /etc/httpd/conf/ssl/domain.com.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl/decrypted-private-key.pem
SSLCertificateChainFile /etc/httpd/conf/ssl/gd_bundle.crt

ErrorLog logs/ssl.domain.com.error_log
CustomLog logs/ssl.domain.com.access_log combined

Apache restarts just fine.

when i navigate to my site however, I get an 'untrusted connection' warning. Digging in a little deeper, chrome shows me the certificate is named 'phoneme1' (no idea where this certificate resides) and that it is self-signed (my certs are signed by godaddy). It makes me think something is being overridden by a setting elsewhere. Any thoughts on how to get the right SSL certificate to serve?

This is on CentOs 6.2, running apache.

share|improve this question
Can you provide the output of /usr/sbin/httpd -S ? –  faker Dec 30 '12 at 21:23

1 Answer 1

Chrome normally adds "http://www." if you type "domain.com", so I assume the request goes to "www.domain.com" which is a different host than domain.com when you're using NameVirtualHost.

So I'd suggest trying to add the following line to your configuration:

ServerAlias www.domain.com

Of couse you have to restart the apache2 or at least you must reload the configuration!

Edit (22:43 local time): This answer assumes that all certificate files are valid and accessible!

share|improve this answer
In my tests chrome is not automatically adding www to URLs you enter. –  faker Dec 30 '12 at 21:46
Do you just enter "domain.com" or "domain.com";? –  Simon Strasser Dec 30 '12 at 22:11
Just "domain.com" but not literally "domain.com", since the owners of domain.com setup a 301 redirect from domain.com to www.domain.com. I have my own .com domain with which I tested it. –  faker Dec 30 '12 at 22:19
Thanks very much for posting. This didn't quite do it for me. The self-signed certificate is continuing to serve. –  E T Dec 30 '12 at 23:52

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.