Make HTTPS for free with Amazon Linux2 + Freenom + Let's Encrypt

I made it HTTPS for free with Amazon Linux2 + Freenom + Let's Encrypt, so make a note in case you do not have any trouble when you do the same work later. Basically, I will mainly write the work of Let's Encrypt.

EC2#

--Open security group inbound 80,443 ports for issuing certificates.

Freenom#

--The domain name has been acquired and the A record has been created. --www.naata.com IN A IP address

Let’s Encrypt#

Install Let ’s Encrypt Certbot client

$ sudo amazon-linux-extras install epel

Install certbot, python-certbot-apache packages

$ sudo yum install certbot python-certbot-apache

Edit Server Name

httpd.conf


ServerName:www.naata.com

Obtaining a server certificate using the certbot command

$ sudo certbot certonly --webroot -w /var/www/html/ -d www.naata.com
$ sudo ls -l /etc/letsencrypt/live/www.naata.com
total 4
lrwxrwxrwx 1 root root  56 Sep 25 07:50 cert.pem -> ../../archive/www.naata.com
lrwxrwxrwx 1 root root  57 Sep 25 07:50 chain.pem -> ../../archive/www.naata.com
lrwxrwxrwx 1 root root  61 Sep 25 07:50 fullchain.pem -> ../../archive/www.naata.com
lrwxrwxrwx 1 root root  59 Sep 25 07:50 privkey.pem -> ../../archive/www.naata.com
-rw-r--r-- 1 root root 692 Sep 25 07:50 README

Restart httpd

$ sudo systemctl restart httpd.service
$ sudo systemctl status httpd.service

Edit ssl.conf

ssl.conf


SSLCertificateFile /etc/letsencrypt/live//www.naata.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live//www.naata.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live//www.naata.com/chain.pem

Operation check

$ curl -vv https://www.naata.com

Recommended Posts

Make HTTPS for free with Amazon Linux2 + Freenom + Let's Encrypt
HTTPS with Django and Let's Encrypt
Let's make Othello with wxPython
Let's make dice with tkinter
Make Amazon Linux 2 (CentOS) GUI
Let's make a WEB application for phone book with flask Part 2
Let's make a WEB application for phone book with flask Part 3
Let's make a WEB application for phone book with flask Part 4
Prepare pipenv environment with amazon Linux 2
Let's make a GUI with python.
Let's make a breakout with wxPython
Let's make Othello AI with Chainer-Part 1-
Let's make a graph with python! !!
Let's make a supercomputer with xCAT
Let's make Othello AI with Chainer-Part 2-
Procedure for building a kube environment on amazon linux2 (aws) ~ (with bonus)
Building a Python3 environment with Amazon Linux2
Let's make a shiritori game with Python
Let's create a free group with Python
Let's make a voice slowly with Python
Let's make a simple language with PLY 1
[Python] Let's make matplotlib compatible with Japanese
Let's try Linux for the first time
Django Project HTTPS Server Settings: Let's Encrypt
Let's make a web framework with Python! (1)
Let's make a tic-tac-toe AI with Pylearn 2
Let's make a Twitter Bot with Python!
Let's make a web framework with Python! (2)
Let's make a Backend plugin for Errbot
[Linux] Build a Docker environment with Amazon Linux 2