`nginx` serves static file in multiple domains server Net::err_cert_common_name_invalid

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: setoelkahfi.com

I ran this command:

It produced this output:

My web server is (include version): nginx

The operating system my web server runs on is (include version): Debian 11

My hosting provider, if applicable, is: Hetzner

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

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): -

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot 1.12.0

I'm using a Debian server to host multiple domains. I'm trying to serve a static index.html file from one of the domain and got that Net::err_cert_common_name_invalid.

It was initially showed another domain name (scandinasia.eu) in the screenshot, that is one of the domains in the server. Now it shows the correct domain (setoelkahfi.com) but it still shows the same warning, without the padlock.

My certbot certificates output for the domain:

  Certificate Name: setoelkahfi.com
    Serial Number: 337db35adcf92ad2f5fb19fdd43c85122e5
    Key Type: RSA
    Domains: setoelkahfi.com www.setoelkahfi.com
    Expiry Date: 2025-03-06 07:30:22+00:00 (VALID: 66 days)
    Certificate Path: /etc/letsencrypt/live/setoelkahfi.com/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/setoelkahfi.com/privkey.pem

Any clue?

Cannot edit the thread:
nginx/1.18.0

I don't know why you would see a "Not Secure" notice for that domain and certificate. That looks correct.

I do notice a couple things though. One is that you do not redirect HTTP requests to HTTPS. And, oddly, HTTP requests to your "home" page get a 404 Not Found error. HTTPS requests to your home page work fine.

The other thing is the cert you got today only has your setoelkahfi.com name in it. Your prior certs also had the www subdomain for that. If you want your www name to work with HTTPS, even to redirect, you need to reissue your cert.

A good place to start is showing the current output of:

sudo certbot certificates

Below are two tests of HTTPS to your domain and they work fine:
SSL Checker: https://decoder.link/sslchecker/setoelkahfi.com/443
SSL Labs: https://www.ssllabs.com/ssltest/analyze.html?d=setoelkahfi.com&hideResults=on

3 Likes

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