ユーザ用ツール

サイト用ツール


serverapps:security:cert:acmesh

文書の過去の版を表示しています。


acme.sh

install

pkg
pkg install acme.sh
curl
curl https://get.acme.sh | sh -s email=my@example.com
wget
wget -O -  https://get.acme.sh | sh -s email=my@example.com
git
git clone https://github.com/acmesh-official/acme.sh.git
cd ./acme.sh
./acme.sh --install -m my@example.com

cron

curlやwgetでinstallした場合には設定されるがpkgでは設定されないので以下を参考に設定する

0 0 * * * /usr/local/sbin/acme.sh --cron --home "/home/user/.acme.sh" > /dev/null

取得した証明書の配置

コマンド/オプション値の例説明
–install-cert-鍵の配置とreload
-dwww.example.comドメイン(必須)
–cert-file/path/to/certfile/in/apache/cert.pem サーバ証明書ファイル
–key-file path/to/keyfile/in/apache/key.pemサーバの秘密鍵
–fullchain-file path/to/fullchain/certfile/apache/fullchain.pem 中間認証局証明書+サーバ証明書ファイル
–reloadcmd “service apache2 force-reload”再読み込みコマンド

Apache

acme.sh --install-cert -d example.com \
--cert-file      /path/to/certfile/in/apache/cert.pem  \
--key-file       /path/to/keyfile/in/apache/key.pem  \
--fullchain-file /path/to/fullchain/certfile/apache/fullchain.pem \
--reloadcmd     "service apache2 force-reload"

nginx

acme.sh --install-cert -d example.com \
--key-file       /path/to/keyfile/in/nginx/key.pem  \
--fullchain-file /path/to/fullchain/nginx/cert.pem \
--reloadcmd     "service nginx force-reload"

Serevr

参考

serverapps/security/cert/acmesh.1745395860.txt.gz · 最終更新: 2025/04/23 08:11 by hayashi