Skip to content

Error certification on virtualmin/Nginx

Solved Linux
17 2 2.9k 1
  • Hello mark

    It’s strange this evening I no longer had SSL access to my dev environment

    I had a zeroSSL CA certificate that was still valid until the end of the month.
    I rebooted the machine as well.

    So I checked my DNS, Cloudflare, domain name, nginx service, all is OK.
    I regenerated a certificate on zero SSL but I got an error saying there is a problem with the certificate (invalid certificate)

    9166b7c8-1471-4246-b43b-13790a664197-image.png

    Your connection is not private
    Malicious individuals may be trying to steal your personal information from the nodebbdev.xxxxxx.fr site (passwords, messages or credit card numbers, for example). Learn more
    NET::ERR_CERT_COMMON_NAME_INVALID

    fbbc49fc-9887-4c41-ac28-9eede0a83bd6-image.png

    I can Bypass the message but that’s not the goal

  • Maybe better, I don’t know how anymore in Virtualmin, there was a bug with virtualmin/Let’s encrypt, I have to look for it

    @DownPW yes, it’s a bit hit and miss, but certbot will work. Have a look at this

    https://sudonix.org/topic/54/virtualmin-letsencrypt-renewal

  • aea4ec70-b4d9-4dbd-95cd-473b2b9a2daf-image.png

    It is impossible to verify on the server that it is indeed the domain nodebbdev.test.fr, because its security certificate comes from the domain test.fr. This could be due to a misconfiguration or your connection being intercepted by a hacker.

    @phenomlab

    Seems to be a configuration problem but don’t know where and why ?
    I have installed the ZeroSSL CA certificate on domain and nodebbdev subdomain.

  • aea4ec70-b4d9-4dbd-95cd-473b2b9a2daf-image.png

    It is impossible to verify on the server that it is indeed the domain nodebbdev.test.fr, because its security certificate comes from the domain test.fr. This could be due to a misconfiguration or your connection being intercepted by a hacker.

    @phenomlab

    Seems to be a configuration problem but don’t know where and why ?
    I have installed the ZeroSSL CA certificate on domain and nodebbdev subdomain.

    @DownPW it looks to me that the cert you are using isn’t a wildcard or for the subdomain.

  • d**n, maybe you are right because I’m on a ZeroSSL free account
    But I can normally generate a certificate for all subdomains. I didn’t get this message before.

  • d**n, maybe you are right because I’m on a ZeroSSL free account
    But I can normally generate a certificate for all subdomains. I didn’t get this message before.

    @DownPW how are you generating the certificate?

  • like this

    image.png

    replace test.fr with my domaine of course. (not subdomain)

  • like this

    image.png

    replace test.fr with my domaine of course. (not subdomain)

    @DownPW yes, you need a wildcard cert for the subdomain to work. Can you use LetsEncrypt?

  • Maybe better, I don’t know how anymore in Virtualmin, there was a bug with virtualmin/Let’s encrypt, I have to look for it

  • Maybe better, I don’t know how anymore in Virtualmin, there was a bug with virtualmin/Let’s encrypt, I have to look for it

    @DownPW yes, it’s a bit hit and miss, but certbot will work. Have a look at this

    https://sudonix.org/topic/54/virtualmin-letsencrypt-renewal

  • I did like that from memory and select subdomain but I would like to take a longer time. Memorizing the certificate didn’t last long

    sudo certbot --nginx -v

  • I did like that from memory and select subdomain but I would like to take a longer time. Memorizing the certificate didn’t last long

    sudo certbot --nginx -v

    @DownPW should be 90 days?

  • Yes I guess but it’s not much but it doesn’t matter. I don’t see any commands in the help
    Should I delete the Zerro SSL certificate via Webmin before? Think yes

    image.png

    and this bug that we can’t regenerate a certificate without error via virtualmin is really annoying.

  • Yes I guess but it’s not much but it doesn’t matter. I don’t see any commands in the help
    Should I delete the Zerro SSL certificate via Webmin before? Think yes

    image.png

    and this bug that we can’t regenerate a certificate without error via virtualmin is really annoying.

    @DownPW said in Error certification on virtualmin/Nginx:

    Should I delete the Zerro SSL certificate via Webmin before? Think yes

    Yes.

    @DownPW said in Error certification on virtualmin/Nginx:

    and this bug that we can’t regenerate a certificate without error via virtualmin is really annoying.

    What is the error message?

  • I have regenerate with certbot, reload nginx without errors but it is still the zeroSSL certificate that appears in Webmin/Current Certificate

    Do you want to expand and replace this existing certificate with the new
    certificate?
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    (E)xpand/(C)ancel: E
    Renewing an existing certificate for virtuaverse.fr and 2 more domains
    
    Successfully received certificate.
    Certificate is saved at: /etc/letsencrypt/live/nodebbdev.xxx.fr/fullchain.pem
    Key is saved at:         /etc/letsencrypt/live/nodebbdev.xxx.fr/privkey.pem
    This certificate expires on 2023-12-31.
    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
    Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/xxx.fr.conf
    Successfully deployed certificate for xxx.fr to /etc/nginx/sites-enabled/xxx.fr.conf
    Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/proxy.xxx.fr.conf
    Successfully deployed certificate for proxy.xxx.fr to /etc/nginx/sites-enabled/proxy.xxx.fr.conf
    Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/nodebbdev.xxx.fr.conf
    Successfully deployed certificate for nodebbdev.xxx.fr to /etc/nginx/sites-enabled/nodebbdev.xxx.fr.conf
    Traffic on port 80 already redirecting to ssl in /etc/nginx/sites-enabled/xxx.fr.conf
    Traffic on port 80 already redirecting to ssl in /etc/nginx/sites-enabled/proxy.xxx.fr.conf
    Traffic on port 80 already redirecting to ssl in /etc/nginx/sites-enabled/nodebbdev.xxx.fr.conf
    Your existing certificate has been successfully renewed, and the new certificate has been installed.
    

    703b34e3-77df-4bca-9578-1d0d04b3ebe2-image.png

    ada17138-1945-4794-aa91-8865eaa0a528-image.png

    EDIT : Very Strange, i test again to regenerate certificat with let’s encrypt on virtualmin and that’s work and Current certificate is now OK on virtualmin.
    it never worked for several months and it works now, very strange 😲

  • I have regenerate with certbot, reload nginx without errors but it is still the zeroSSL certificate that appears in Webmin/Current Certificate

    Do you want to expand and replace this existing certificate with the new
    certificate?
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    (E)xpand/(C)ancel: E
    Renewing an existing certificate for virtuaverse.fr and 2 more domains
    
    Successfully received certificate.
    Certificate is saved at: /etc/letsencrypt/live/nodebbdev.xxx.fr/fullchain.pem
    Key is saved at:         /etc/letsencrypt/live/nodebbdev.xxx.fr/privkey.pem
    This certificate expires on 2023-12-31.
    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
    Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/xxx.fr.conf
    Successfully deployed certificate for xxx.fr to /etc/nginx/sites-enabled/xxx.fr.conf
    Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/proxy.xxx.fr.conf
    Successfully deployed certificate for proxy.xxx.fr to /etc/nginx/sites-enabled/proxy.xxx.fr.conf
    Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/nodebbdev.xxx.fr.conf
    Successfully deployed certificate for nodebbdev.xxx.fr to /etc/nginx/sites-enabled/nodebbdev.xxx.fr.conf
    Traffic on port 80 already redirecting to ssl in /etc/nginx/sites-enabled/xxx.fr.conf
    Traffic on port 80 already redirecting to ssl in /etc/nginx/sites-enabled/proxy.xxx.fr.conf
    Traffic on port 80 already redirecting to ssl in /etc/nginx/sites-enabled/nodebbdev.xxx.fr.conf
    Your existing certificate has been successfully renewed, and the new certificate has been installed.
    

    703b34e3-77df-4bca-9578-1d0d04b3ebe2-image.png

    ada17138-1945-4794-aa91-8865eaa0a528-image.png

    EDIT : Very Strange, i test again to regenerate certificat with let’s encrypt on virtualmin and that’s work and Current certificate is now OK on virtualmin.
    it never worked for several months and it works now, very strange 😲

    @DownPW go figure…

  • yep very very erratic

    In any case, thank you for the support.

  • DownPWundefined DownPW has marked this topic as solved on
  • yep very very erratic

    In any case, thank you for the support.

    @DownPW anytime


Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics
  • configure ghost and wordpress combo

    Moved Solved WordPress ghost wordpress nginx
    9
    7 Votes
    9 Posts
    2k Views
    @Madchatthew I’d always post for the reasons I stated above. It’s useful information and could save someone else the headache.
  • 3 Votes
    30 Posts
    5k Views
    @DownPW any update?
  • Is nginx necessary to use?

    Moved Solved Hosting nginx web
    2
    1 Votes
    2 Posts
    927 Views
    @Panda said in Cloudflare bot fight mode and Google search: Basic question again, is nginx necessary to use? No, but you’d need something at least to handle the inbound requests, so you could use Apache, NGINX, Caddy… (there are plenty of them, but I tend to prefer NGINX) @Panda said in Cloudflare bot fight mode and Google search: Do these two sites need to be attached to different ports, and the ports put in the DNS record? No. They will both use ports 80 (HTTP) and 443 (HTTPS) by default. @Panda said in Cloudflare bot fight mode and Google search: Its not currently working, but how would the domain name know which of the two sites to resolve to without more info? Currently it only says the IP of the whole server. Yes, that’s correct. Domain routing is handled (for example) at the NGINX level, so whatever you have in DNS will be presented as the hostname, and NGINX will expect a match which once received, will then be forwarded onto the relevant destination. As an example, in your NGINX config, you could have (at a basic level used in reverse proxy mode - obviously, the IP addresses here are redacted and replaced with fakes). We assume you have created an A record in your DNS called “proxy” which resolves to 192.206.28.1, so fully qualified, will be proxy.sudonix.org in this case. The web browser requests this site, which is in turn received by NGINX and matches the below config server { server_name proxy.sudonix.org; listen 192.206.28.1; root /home/sudonix.org/domains/proxy.sudonix.org/ogproxy; index index.php index.htm index.html; access_log /var/log/virtualmin/proxy.sudonix.org_access_log; error_log /var/log/virtualmin/proxy.sudonix.org_error_log; location / { proxy_set_header Access-Control-Allow-Origin *; proxy_set_header Host $host; proxy_pass http://localhost:2000; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Api-Key $http_x_api_key; } location /images { index index.php index.htm index.html; root /home/sudonix.org/domains/proxy.sudonix.org/ogproxy; } fastcgi_split_path_info "^(.+\.php)(/.+)$"; listen 192.206.28.1:443 ssl http2; ssl_certificate /home/sudonix.org/domains/proxy.sudonix.org/ssl.combined; ssl_certificate_key /home/sudonix.org/ssl.key; } The important part here is server_name proxy.sudonix.org; as this is used to “map” the request to the actual domain name, which you can see in the root section as root /home/sudonix.org/domains/proxy.sudonix.org/ogproxy; As the DNS record you specified matches this hostname, NGINX then knows what to do with the request when it receives it.
  • Virtualmin Setup DigitalOcean

    Solved Customisation virtualmin digitalocean
    26
    9 Votes
    26 Posts
    6k Views
    @Hari said in Virtualmin Setup DigitalOcean: i have felt it is very hard to manage Virtualmin the settings are confusing It’s a bit of a learning curve, admittedly, but very powerful and easy to use provided you understand the implications of what you are doing. For example, moving a VirtualMin server to subserver and then back again without changing underlying components that rely on the correct placement of the server, of course it will no longer work.
  • IRC Server/Client - Chat App with NodeBB

    Linux nodebb irc server client
    6
    1 Votes
    6 Posts
    2k Views
    @Hari not sure from the consumer perspective, but Skype has been all but completely consumed by Microsoft Teams when it comes to business usage.
  • VirtualMin create virtual server

    Solved Configure
    4
    2 Votes
    4 Posts
    1k Views
    @justoverclock correct. You only need to keep an eye on the resources of the droplet itself
  • nginx seo urls

    Solved Configure
    15
    3 Votes
    15 Posts
    3k Views
    @riekmedia that looks fine to me
  • 1 Votes
    12 Posts
    3k Views
    @ash3t Great Glad everything has worked out.