Black Friday sale is now on! 50% off Laravel: The Modular Way. Learn more

Setup Digital Ocean - Part 5 Lets Encrypt

David Carr

Digital Ocean VPS Tutorials


    Setting up an SSL certificate enables HTTPS on the web server, which secures the traffic between the server and the clients connecting to it. Certbot is a free and automated way to set up SSL certificates on a server. It’s included as part of the LAMP One-Click to make securing the Droplet easier.

    To use Certbot, you’ll need a registered domain name and two DNS records:

    An A record from a domain (e.g., example.com) to the server’s IP address
    An A record from a domain prefaced with www (e.g., www.example.com) to the server’s IP address
    Additionally, if you’re using a virtual hosts file, you’ll need to make sure the server name directive in the VirtualHost block (e.g., ServerName example.com) is correctly set to the domain.

    Once the DNS records and, optionally, the virtual hosts files are set up, you can generate the SSL certificate. Make sure to substitute the domain in the command.

    certbot --apache -d test.com -d www.test.com

    Laravel Modules Book by David Carr

    Help support the blog so that I can continue creating new content!

    Subscribe to my newsletter

    Subscribe and get my books and product announcements.

    © 2009 - 2022 DC Blog. All code MIT license. All rights reserved.