[SOLVED]net::ERR_CERT_COMMON_NAME_INVALID (Wildcard)


#1

Hello All,

Thanks to you guys my domain is working again and the main domain is redirecting towards https.
But as soon as I browse to https://xanv.ccvitaal.nl I receive the error message
net::ERR_CERT_COMMON_NAME_INVALID

This site cannot be loaded due to a certificate error: https://xanv.ccvitaal.nl/net::ERR_CERT_COMMON_NAME_INVALID

Certificate info

Common Name (CN): ccvitaal.nl

Serial Number: 04:DC:89:EC:15:70:79:C9:33:84:3F:9D:50:F1:E2:BC:7E:8F

Issued By

Common Name (CN): Let’s Encrypt Authority X3

So the certificate is from ccvitaal.nl, which is my main domain.

How can I solve this issue?

My conf files for ccvitaal.nl is:

<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin lennard@ccvitaal.nl
ServerName ccvitaal.nl
ServerAlias www.ccvitaal.nl
DocumentRoot /var/www/ccvitaal.nl/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/ccvitaal.nl/fullchain.pem 
SSLCertificateKeyFile /etc/letsencrypt/live/ccvitaal.nl/privkey.pem
</VirtualHost>
</IfModule>

<VirtualHost *:80>
ServerAdmin lennard@ccvitaal.nl
ServerName ccvitaal.nl
ServerAlias www.ccvitaal.nl
DocumentRoot /var/www/ccvitaal.nl/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =ccvitaal.nl [OR]
RewriteCond %{SERVER_NAME} =www.ccvitaal.nl
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

My conf for xanv.ccvitaal.nl

<VirtualHost *:80>
ServerAdmin info@xanv.ccvitaal.nl
ServerName xanv.ccvitaal.nl
ServerAlias xanv.ccvitaal.nl
DocumentRoot /var/www/xanv.ccvitaal.nl/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>



<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin lennard@ccvitaal.nl
ServerName xanv.ccvitaal.nl
ServerAlias www.xanv.ccvitaal.nl
DocumentRoot /var/www/xanv.ccvitaal.nl/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/ccvitaal.nl/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/ccvitaal.nl/privkey.pem
</VirtualHost>
</IfModule>

In my /etc/letsencrypt/live# folder I have:

ccvitaal.nl
ccvitaal.nl-001

both with : cert.pem, chain.pem, fullchain.pem and privkey.pem

I got the feeling that I’m nearly there, but what do I miss?

Kr


My domain is: xanv.ccvitaal.nl

I ran this command:
sudo certbot certonly --server https://acme-v02.api.letsencrypt.org/directory --manual --preferred-challenges dns -d ‘ccvitaal.nl,*.ccvitaal.nl’

It produced this output:
This works well and I change the TXT on DNS settings as well. My main domain is working fine.

My web server is (include version):
Apache2

Server version: Apache/2.4.18 (Ubuntu)
Server built: 2018-06-07T19:43:03

The operating system my web server runs on is (include version):My hosting provider, if applicable, is:
Unbuntu

I can login to a root shell on my machine (yes or no, or I don’t know):
Yes


#2

I just thought, let try the “ccvitaal.nl-001” in my VirtualHost, and this solved the issue. :slight_smile:

So all good to go…


#3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.