#author("2020-04-27T09:24:01+09:00","","")
#navi2(Raspberry Pi/Ubuntu Server/nginx,toc,prev,next)
----
#contents
----
* nginx SSL設定 (HTTPS設定) [#j2a40ca8]

** Let's Encrypt を用いた 証明書の生成 [#sbfe8557]
ドメインを取得している場合、Let's Encrypt を用いて、ブラウザ等にて警告がでない HTTPS 通信が可能です。
+インストール
 # apt install certbot
+ルータ等の設定を変更し、外部から HTTP, HTTPS にアクセスできる状態にする。
+nginxを一旦停止する。
 # service nginx stop
+証明書を生成する。
 # certbot certonly
+いくつか問われるので、適宜設定する。
 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):
certbot 用のサーバーを利用して証明書を生成するので''1 [Enter]'' を押下する。
 Plugins selected: Authenticator standalone, Installer None
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.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
利用規約同意なので、内容を確認して、Agree を選択する。(A [Enter])
 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 our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.]
メール送ってよいか問われるので、Yes/No いずれかを入力する。
 Please enter in your domain name(s) (comma and/or space separated)  (Enter 'c'
to cancel):
ドメイン名を入力します。(複数ある場合は、カンマかスペース区切りで入力します。)
生成に成功すると、証明書が保存された場所が表示されます。
通常 /etc/letsencrypt/live/[ドメイン名]/ 配下に、fullchain.pem, privkey.pem が生成されます。





----
#navi2(Raspberry Pi/Ubuntu Server/nginx,toc,prev,next)

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