#author("2018-08-26T00:45:16+09:00","","")
[[CentOS7]]

*Webサーバー間通信内容暗号化(Apache+nginx) [#o02bf971]
[[Let's Encrypt>https://letsencrypt.jp/]]は無料で利用できて商用利用可能な証明書発行サービスです。''https''化に必要な''SSL''証明書が無料で発行されるなんて、良い時代になりましたね。

しかし証明書の有効期限は&color(red){''90''日};なのでその度に、更新作業は面倒なので、自動化してしまいましょう。

*Lets's Encryptの導入 [#vbe41c1e]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# cd /usr/local/ &color(lime){← ディレクトリ移動};|
|[root@localhost local]# git clone https://github.com/certbot/certbot &color(lime){← Certbotクライアントダウンロード};|
[root@localhost local]# cd &color(lime){← ディレクトリ移動};|
[root@localhost ~]# /usr/local/certbot/certbot-auto -n &color(lime){← Certbotクライアントインストール};|

*SSL証明書発行 [#d6341c49]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# sudo ./certbot-auto certonly|
|Saving debug log to /var/log/letsencrypt/letsencrypt.log &br;  &br; How would you like to authenticate with the ACME CA? &br; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - &br; 1: Apache Web Server plugin - Beta (apache) &br; 2: Nginx Web Server plugin (nginx) &br; 3: Spin up a temporary webserver (standalone) &br; 4: Place files in webroot directory (webroot) &br; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - &br; Select the appropriate number [1-4] then [enter] (press 'c' to cancel): &color(lime){2}; &color(lime){←2(Nginx)を選択}; &br;  &br; |Plugins selected: Authenticator nginx, Installer None &br; Please enter in your domain name(s) (comma and/or space separated)  (Enter 'c' &br; to cancel): &color(lime){hoge.jp}; &color(lime){←ドメイン名(FQDN)を入力}; &br;  &br; Obtaining a new certificate &br; Performing the following challenges: &br; http-01 challenge for &color(lime){hoge.jp}; &br; Waiting for verification... &br; Cleaning up challenges &br;  &br; IMPORTANT NOTES: &br;  - Congratulations! Your certificate and chain have been saved at: &br;    /etc/letsencrypt/live/&color(lime){hoge.jp};/fullchain.pem &br;    Your key file has been saved at: &br;    /etc/letsencrypt/live/&color(lime){hoge.jp};/privkey.pem &br;    Your cert will expire on 2018-11-23. To obtain a new or tweaked &br;    version of this certificate in the future, simply run certbot-auto &br;    again. To non-interactively renew *all* of your certificates, run &br;    "certbot-auto renew" &br;  - If you like Certbot, please consider supporting our work by: &br;  &br;    Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate &br;    Donating to EFF:                    https://eff.org/donate-le|

指示に従ってすすめていきます。

*Webサーバ(Ngninx)の設定 [#f55b3c0e]

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS