Moodle 3.3.1 Fedora Nginx SELinux MariaDB

6. Let's Encrypt 無料サーバー証明書

- T N の投稿
返信数: 0

無料なので、Let's Encrypt サーバー証明書を利用してみる。

# dnf install certbot
# certbot

Certbot doesn’t know how to automatically configure the web server on this system. However, it can still get a certificate for you. Please run “certbot certonly” to do so. You’ll need to manually configure your web server to use the resulting certificate.



# certbot certonly
How would you like to authenticate with the ACME CA?
-------------------------------------------------------------------------------
1: Spin up a temporary webserver (standalone)
2: Place files in webroot directory (webroot)
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel):<自分のメールアドレス>
-------------------------------------------------------------------------------
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf. You must agree
in order to register with the ACME server at
https://acme-v01.api.letsencrypt.org/directory
-------------------------------------------------------------------------------
(A)gree/(C)ancel: A
-------------------------------------------------------------------------------
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about EFF and
our work to encrypt the web, protect its users and defend digital rights.
-------------------------------------------------------------------------------
(Y)es/(N)o: <任意>


Select the webroot for 192.168.3.7: ------------------------------------------------------------------------------- 1: Enter a new webroot ------------------------------------------------------------------------------- Press 1 [enter] to confirm the selection (press 'c' to cancel): 1


次に webroot の入力を求められるので、/var/www/html と入力すると、

IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at /etc/letsencrypt/live/192.168.3.7/fullchain.pem. Your cert will expire on 2017-11-10. To obtain a new or tweaked version of this certificate in the future, simply run certbot again. To non-interactively renew *all* of your certificates, run "certbot renew" - Your account credentials have been saved in your Certbot configuration directory at /etc/letsencrypt. You should make a secure backup of this folder now. This configuration directory will also contain certificates and private keys obtained by Certbot so making regular backups of this folder is ideal. - If you like Certbot, please consider supporting our work by: Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate Donating to EFF: https://eff.org/donate-le
自己サーバー証明書に関する記述と置き換える。
# vi /etc/nginx/nginx.conf
ssl_certificate "/etc/letsencrypt/192.168.3.7/cert.pem";
ssl_certificate_key "/etc/letsencrypt/live/192.168.3.7/privkey.pem";

# nginx -t
# nginx -s reload

# crontab -e
0 3 * * * /usr/bin/certbot renew
評点平均: お役立ち度: ★★★★★★★ (1)