Skip to content

Instantly share code, notes, and snippets.

@gitSambhal
Created February 23, 2024 14:08
Show Gist options
  • Save gitSambhal/f6b959150a411beadd889e1e3f09bdc0 to your computer and use it in GitHub Desktop.
Save gitSambhal/f6b959150a411beadd889e1e3f09bdc0 to your computer and use it in GitHub Desktop.

Revisions

  1. gitSambhal created this gist Feb 23, 2024.
    20 changes: 20 additions & 0 deletions ssl-certificate-generation-in-ubuntu.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    =========================================
    Step 1 — Installing Certbot
    sudo snap install core; sudo snap refresh core

    Remove if ready installed
    sudo apt remove certbot

    sudo snap install --classic certbot
    sudo ln -s /snap/bin/certbot /usr/bin/certbot

    - Obtain certificate
    sudo certbot --nginx -d example.com -d www.example.com

    Step 3 — Allowing HTTPS Through the Firewall
    sudo ufw status

    Step 5 — Verifying Certbot Auto-Renewal
    sudo systemctl status snap.certbot.renew.service
    sudo certbot renew --dry-run
    ============================================