SSL Certificate is Active

Create and Delete SSL Certificate Let’s Encrypt

Before creating the Let’s Encrypt SSL Certificate you must do the following basic prerequisites first.

Prerequisite

    1. Don’t forget to put your domain inside /etc/hosts file.
    2. Create NGINX configuration file in /etc/nginx/sites-available/ folder.
    3. Create symbolic link to your domain’s NGINX configuration file inside /etc/nginx/sites-enabled/ folder.
    4. Test your setting by executing $ nginx -t. If all good then restart the server $ service nginx restart

    Let’s go enable your http into https and redirect the http to https forever.

    Create Let’s Encrypt SSL Certificate

    ./certbot-auto -d www.yourdomain.com -d yourdomain.com
    

    Choose redirect your http to https in the middle of Let’s Encrypt SSL activation for your domain.

    Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    1: No redirect - Make no further changes to the webserver configuration.
    2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
    new sites, or if you're confident your site works on HTTPS. You can undo this
    change by editing your web server's configuration.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
    

    Delete Let’s Encrypt SSL Certificate

    ./certbot delete --cert-name www.yourdomain.com
    ./certbot delete --cert-name yourdomain.com
    

Leave a Reply

Your email address will not be published. Required fields are marked *