Creating new certificate for new subdomain : other sites with SSL_ERROR_BAD_CERT_DOMAIN

Hello... (sorry in advance for my english ; I'm french)

My domain is: symposiumallianceglobalexpertise .org (and .international)

I ran this command:
certbot --apache --apache-bin /usr/sbin/httpd --expand -d symposium.symposiumallianceglobalexpertise.org

It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Could not find OpenSSL version; not disabling session tickets.
Requesting a certificate for symposium.symposiumallianceglobalexpertise.org

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/symposium.symposiumallianceglobalexpertise.org/fullchain.pem
Key is saved at: /etc/letsencrypt/live/symposium.symposiumallianceglobalexpertise.org/privkey.pem
This certificate expires on 2024-07-04.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.

Deploying certificate
Successfully deployed certificate for symposium.symposiumallianceglobalexpertise.org to /etc/apache2/vhosts.d/sage_symposium_org-le-ssl.conf
Congratulations! You have successfully enabled HTTPS on https://symposium.symposiumallianceglobalexpertise.org

My web server is (include version): Apache/2.4.58 (Linux/SUSE)

The operating system my web server runs on is (include version):
openSUSE Tumbleweed 20240403

My hosting provider, if applicable, is: Kimsufi (Server), OVH (domain)

I can login to a root shell on my machine : yes

I'm using a control panel to manage my site : no

The version of my client is : certbot 2.10.0

The creation of this certificate worked fine and I could access to the subdomain in HTTPS but the main site (www) and the other subdomain (chat) were working fine but now result a SSL_ERROR_BAD_CERT_DOMAIN error on Firefox. If I ignore the error and pursue the navigation to one of these two sites, it's the new one (symposium) that is shown.Preformatted text

Notes :

  1. I already have separate vhost files for each site.
  2. I've remove all things for the new subdomain (symposium) in order to deliver properly again the main site (www) and the first subdomain (chat).

Hi @Logicielem, and welcome to the LE community forum :slight_smile:

As with all things Apache, I would start with the output of:
sudo apachectl -t -D DUMP_VHOSTS

2 Likes

Hi @rg305, and than you for the answer.
Here is the result of your command :

VirtualHost configuration:
37.187.115.148:80      is a NameVirtualHost
         default server symposium.symposiumallianceglobalexpertise.international (/etc/apache2/vhosts.d/sage_symposium_international.conf:9)
         port 80 namevhost symposium.symposiumallianceglobalexpertise.international (/etc/apache2/vhosts.d/sage_symposium_international.conf:9)
         port 80 namevhost symposium.symposiumallianceglobalexpertise.org (/etc/apache2/vhosts.d/sage_symposium_org.conf:9)
*:443                  is a NameVirtualHost
         default server chat.symposiumallianceglobalexpertise.international (/etc/apache2/vhosts.d/sage_chat_international-le-ssl.conf:2)
         port 443 namevhost chat.symposiumallianceglobalexpertise.international (/etc/apache2/vhosts.d/sage_chat_international-le-ssl.conf:2)
         port 443 namevhost chat.symposiumallianceglobalexpertise.org (/etc/apache2/vhosts.d/sage_chat_org-le-ssl.conf:2)
         port 443 namevhost www.symposiumallianceglobalexpertise.international (/etc/apache2/vhosts.d/sage_international-le-ssl.conf:2)
         port 443 namevhost www.symposiumallianceglobalexpertise.org (/etc/apache2/vhosts.d/sage_org-le-ssl.conf:2)
*:80                   is a NameVirtualHost
         default server defaut.logicielem.com (/etc/apache2/vhosts.d/default.conf:9)
         port 80 namevhost defaut.logicielem.com (/etc/apache2/vhosts.d/default.conf:9)
         port 80 namevhost www.logicielem.com (/etc/apache2/vhosts.d/logicielem.conf:9)
         port 80 namevhost chat.symposiumallianceglobalexpertise.international (/etc/apache2/vhosts.d/sage_chat_international.conf:10)
         port 80 namevhost chat.symposiumallianceglobalexpertise.org (/etc/apache2/vhosts.d/sage_chat_org.conf:10)
         port 80 namevhost www.symposiumallianceglobalexpertise.international (/etc/apache2/vhosts.d/sage_international.conf:9)
         port 80 namevhost www.symposiumallianceglobalexpertise.org (/etc/apache2/vhosts.d/sage_org.conf:9)

Do you see something bad ?

1 Like

I've found the bug !

My last subdomain vhost config file was specifying the IP of my server in the directive VirtualHost so Apache was redirecting all coming request to this site and never the others.

Problem solved.

3 Likes

Yes; But you seem to have already addressed some [if not all] of it.

It would be good to [re]review the latest output [after your change(s)] with:
sudo apachectl -t -D DUMP_VHOSTS

2 Likes

Yes, the result of the command is better now.
Thank you very much for your help !

1 Like