Question

RSA server certificate CommonName (CN) `www.domain.com' does NOT match server name!?

  • Posted August 27, 2013

Hi, My droplet conists of Apache, on centos with virtualmin . Today I updated virtualmin and started getting this error “RSA server certificate CommonName (CN) `www.domain.com’ does NOT match server name!” in Apache error logs, I googled it but did not found any suitable answer. Any pointers would be of great help to me.

Thanks

Subscribe
Share

I had this this error after following the instructions in this document: How To Set Up Apache with a Free Signed SSL Certificate on a VPS

I solved it by adding “ServerName www.mydomainname.com” inside of the VirtualHost as follows:

ServerName www.mydomainname.com
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM
SSLCertificateFile /etc/apache2/ssl/ssl.crt
SSLCertificateKeyFile /etc/apache2/ssl/private.key
SSLCertificateChainFile /etc/apache2/ssl/sub.class1.server.ca.pem
```...

Please note I assume you can also put the ServerName record in <VirtualHost *.80>.
Please see the above link for details.

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

How did you create the SSL cert? You have to put your domain name you’re going to use the SSL cert on in the CN field. If it’s a self-signed certificate, you should just create a new SSL cert.

<b>“Now rebooted the system and there is no error.”</b> <br> <br>You’d be surprised how many people waste time troubleshooting an issue, only to realize that the simple task of a reboot was all that was needed. It’s happened to me countless times!

Glad to hear it’s fixed :]

Thanks for your reply @Pablo & @kamal. but there is no error now. I just cannot understand why? <br>Earlier I was not getting this error, but after updating virtualmin I started getting this error. <br> <br>By the way SSL is a paid SSL certificate from Godaddy. <br>Now rebooted the system and there is no error. <br> <br>Thanks for all your help.

Execute <code>hostname -f</code> to see if your droplet’s FQDN matches what’s in the certificate.

Do you want to know the domain name or the droplet name @Pablo

what’s your server’s name?