How To Secure Apache with Let's Encrypt on Ubuntu

 

Step 1 — Installing Certbot

To obtain an SSL certificate with Let’s Encrypt, you need to install the Certbot software on your server. For this tutorial, we’ll usethe default Ubuntu package repositories to install Certbot.

Run the following command, which will install two packages: certbot and python3-certbot-apache. The latter is a plugin that integrates Certbot with Apache, so that it’s possible to automate obtaining a certificate and configuring HTTPS within your web server with a single command:

  1. sudo apt install certbot python3-certbot-apache

Confirm installation by pressing Y and then ENTER to accept.

Certbot is now installed on your server. Next, you’ll verify Apache’s configuration to make sure your virtual host is set appropriately. This ensures that the certbot client script will be able to detect your domains and reconfigure your web server to use your newly generated SSL certificate automatically.


Step 4 — Obtaining an SSL Certificate

Certbot provides a variety of ways to obtain SSL certificates through plugins. The Apache plugin will take care of reconfiguring Apache and reloading the configuration whenever necessary. To use this plugin, run the following:

  1. sudo certbot --apache

This command will generate a prompt with a series of questions to configure your SSL certificate. First, you’ll be asked to provide a valid email address, this is for the purposes of renewal notifications and security notices:


file upload method with www


sudo certbot certonly --agree-tos --email admin@dinpl.com --manual -d dinpl.com -d www.dinpl.com --server https://acme-v02.api.letsencrypt.org/directory --manual



wildcard


sudo certbot certonly --agree-tos --email admin@dinpl.com --manual -d *.dinpl.com --server https://acme-v02.api.letsencrypt.org/directory --manual

Comments

Popular posts from this blog

cpanel exam CPSP Answers

How to install zimbra collaboration suite 8.8.11 on CentOS 7

awstats installation