LetsEncrypt SSL Nginx on Ubuntu 16.04
The first step to using Let’s Encrypt to obtain an SSL certificate is to install the Certbot software on your server .
First, add the repository.
sudo add-apt-repository ppa:certbot/certbot
Update the package list to pick up the new repository’s package information.
sudo apt-get update
Finally, install Certbot’s Nginx package with apt-get.
sudo apt-get install python-certbot-nginx
Now you the certbot installed in your system.
Certbot can automatically configure SSL for Nginx, but it needs to be able to find the correct server block in your config. It does this by looking for a server_name directive that matches the domain you’re requesting a certificate for.
If you’re starting out with a fresh Nginx install, you can update the default config file. Open it with nano or your favorite text editor.
sudo nano /etc/nginx/sites-available/default
Changes in the Server tab
server_name example.com www.example.com;
Reload Nginx
sudo systemctl reload nginx
Certbot provides a variety of ways to obtain SSL certificates, through various plugins. The Nginx plugin will take care of reconfiguring Nginx and reloading the config whenever necessary:
sudo certbot --nginx -d example.com -d www.example.com
If that’s successful, certbot will ask how you’d like to configure your HTTPS settings.
After configuration you can choose your setting and redirect the http to https . The certbot will configure itself -- but you have the option to configure itself
Let me know if you find this useful.
First, add the repository.
sudo add-apt-repository ppa:certbot/certbot
Update the package list to pick up the new repository’s package information.
sudo apt-get update
Finally, install Certbot’s Nginx package with apt-get.
sudo apt-get install python-certbot-nginx
Now you the certbot installed in your system.
Certbot can automatically configure SSL for Nginx, but it needs to be able to find the correct server block in your config. It does this by looking for a server_name directive that matches the domain you’re requesting a certificate for.
If you’re starting out with a fresh Nginx install, you can update the default config file. Open it with nano or your favorite text editor.
sudo nano /etc/nginx/sites-available/default
Changes in the Server tab
server_name example.com www.example.com;
Reload Nginx
sudo systemctl reload nginx
Certbot provides a variety of ways to obtain SSL certificates, through various plugins. The Nginx plugin will take care of reconfiguring Nginx and reloading the config whenever necessary:
sudo certbot --nginx -d example.com -d www.example.com
If that’s successful, certbot will ask how you’d like to configure your HTTPS settings.
After configuration you can choose your setting and redirect the http to https . The certbot will configure itself -- but you have the option to configure itself
Let me know if you find this useful.
Comments
Post a Comment