Skip to content

Error certification on virtualmin/Nginx

Solved Linux
  • 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.

  • undefined DownPW has marked this topic as solved on 2 Oct 2023, 22:07
  • 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? Why not buy me a coffee? It's a nice gesture, and a great way to show your appreciation 💗


15/17

2 Oct 2023, 22:06



Related Topics
  • Linux Certification

    Linux linux certs 8 Aug 2024, 15:13
    2 Votes
    4 Posts
    225 Views
    @Madchatthew You might be sorry you asked This is the mentoring category below. Presently, it’s unused, but we have a dedicated area for it. https://sudonix.org/category/8/mentoring Other services https://sudonix.org/services
  • 3 Votes
    30 Posts
    2k Views
    @DownPW any update?
  • Is nginx necessary to use?

    Moved Solved Hosting nginx web 18 Jul 2023, 11:28
    1 Votes
    2 Posts
    449 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.
  • 6 Votes
    36 Posts
    3k Views
    @justoverclock said in Digitalocean step by step guide to nginx configuration: i’m learning And that’s the whole point of this site If you don’t learn anything, you gain nothing.
  • 3 Votes
    10 Posts
    1k Views
    @Hari DDoS protection is not just a switch, or one component. It’s a collection of different and often disparate technologies that when grouped together form the basis of a combined toolset that can be used in defence. Typically these consist of IDS (Instrusion Detection System) and IPS (Intrusion Prevention System) components that detect irregularities in network traffic, and will take decisive action based on predefined rulesets, or in the case of more modern systems, AI and ML. Traditional “traffic shaping” technology is also deployed, so if an attack cannot be easily identified as malicious, the bandwidth available to that connection is severely limited to nothing more than a trickle rather than a full flow. Years ago, ISP’s used traffic shaping (also called “policers”) as an effective means of stopping applications such as BearShare, eDonkey, Napster, and other P2P based sharing systems from functioning correctly - essentially reducing the “appeal” of distributing and seeding illegal downloads. This was essentially the ISP’s way of saying “stop what you are doing please” without actually pulling the plug. These days, DDoS attacks are designed to overwhelm - not assume control of - webservers and other public facing components. It’s rare for small entities to be attacked unless there is some form of political agenda driven by your site or product. A classic example is governmental institutions or lawmakers who effectively are classed as “enforcers” and those who disagree are effectively making a statement in the form of Denial of Service. DDoS protection is effectively the responsibility of the hosting provider, but you shouldn’t just assume that they will protect you or your site. Their responsibility stops at their infrastructure, so it’s then up to you too decide how you full the gap in between your host and the website. Typically, you’d leverage something like Imunify360 which you can get for Plesk (and something I’d strongly recommend) but it’s not free, and is a paid (not expensive per month) subscription. If you want to use VirtualMin then there are a variety of tools readily available out of the box such as firewalls and fail2ban.
  • 4 Votes
    10 Posts
    893 Views
    @phenomlab thanks for sharing, after four or five months I will migrate to DO 2 or 4gb RAM droplet.
  • 1 Votes
    12 Posts
    2k Views
    @ash3t Great Glad everything has worked out.
  • 0 Votes
    5 Posts
    1k Views
    @Ash3T I’m going to mark this post as solved as I’ve not heard from you in a while. Let me know if this isn’t the case and you need more help.