serverapps:security:cert:acmesh:letsencrypt
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
serverapps:security:cert:acmesh:letsencrypt [2024/12/09 06:18] – hayashi | serverapps:security:cert:acmesh:letsencrypt [2024/12/09 09:36] (現在) – [ACME チャレンジの設定] hayashi | ||
---|---|---|---|
行 1: | 行 1: | ||
====== Let's Encrypt====== | ====== Let's Encrypt====== | ||
+ | |||
+ | 以下の様にnginxでproxyを構成している前提 | ||
+ | |||
+ | < | ||
+ | _____ | ||
+ | | ||
+ | (_Internet_)======|proxy|=============|Server| | ||
+ | (______) | ||
+ | </ | ||
+ | |||
+ | acme.shはこの前段のnginxで動作しているものとします | ||
+ | |||
+ | ===== Default server ===== | ||
+ | |||
+ | $ acme.sh --set-default-ca --server letsencrypt_test | ||
+ | | ||
+ | |||
+ | ===== レジスト ===== | ||
+ | # acme.sh --register-account -m yourname@example.com | ||
+ | [...... 2022] Registering account: https:// | ||
+ | [...... 2022] Registered | ||
+ | [...... 2022] ACCOUNT_THUMBPRINT=' | ||
+ | |||
+ | ===== Nginx Proxyの設定 ===== | ||
+ | ==== webroot ディレクトリの作成 ==== | ||
+ | |||
+ | mkdir -p / | ||
+ | chown -R www:www / | ||
+ | |||
+ | ==== ACME チャレンジの設定 ==== | ||
+ | これは別ファイルとして必要に応じて組み込む | ||
+ | |||
+ | <file config / | ||
+ | location / | ||
+ | alias / | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ==== Virtual hostの例 ==== | ||
+ | |||
+ | <file - / | ||
+ | |||
+ | server { | ||
+ | listen 80; | ||
+ | |||
+ | server_name mydomain.com; | ||
+ | |||
+ | # .... | ||
+ | |||
+ | # Let's Encrypt webroot | ||
+ | include includes/ | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | === domainが複数の場合の例 === | ||
+ | |||
+ | server_name 1.mydomain.com 2.mydomain.com 3.mydomain.com; | ||
+ | または | ||
+ | server_name *.mydomain.com *.testmydomain.com; | ||
+ | |||
+ | ===== 証明書発行 ===== | ||
- | ^Short Name^ACME server URL^ | ||
- | |letsencrypt|https:// | ||
- | |letsencrypt_test|https:// |
serverapps/security/cert/acmesh/letsencrypt.1733725129.txt.gz · 最終更新: 2024/12/09 06:18 by hayashi