This commit is contained in:
colben 2021-11-14 15:03:15 +08:00
parent 535f2e8a52
commit f810ebf1d9

View File

@ -7,7 +7,7 @@ tags: ["letsencrypt", "certbot", "ssl"]
categories: ["web"] categories: ["web"]
--- ---
# 安装 certbot ## 安装 certbot
- 在 alpine linux 中安装 certbot - 在 alpine linux 中安装 certbot
```bash ```bash
apk add --no-cache certbot openssl apk add --no-cache certbot openssl
@ -18,7 +18,7 @@ categories: ["web"]
certbot register --register-unsafely-without-email --agree-tos certbot register --register-unsafely-without-email --agree-tos
``` ```
# 普通域名证书 ## 普通域名证书
- 申请 ssl 证书,有效期 90 天 - 申请 ssl 证书,有效期 90 天
```bash ```bash
certbot certonly -n -d x.x.com --standalone certbot certonly -n -d x.x.com --standalone
@ -38,7 +38,7 @@ categories: ["web"]
openssl dhparam -out /etc/letsencrypt/dhparam.pem 2048 openssl dhparam -out /etc/letsencrypt/dhparam.pem 2048
``` ```
# 通配域名证书 ## 通配域名证书
- 申请 ssl 证书,有效期 90 天 - 申请 ssl 证书,有效期 90 天
```bash ```bash
certbot certonly --manual -d '*.x.com' \ certbot certonly --manual -d '*.x.com' \
@ -61,7 +61,7 @@ categories: ["web"]
openssl dhparam -out /etc/letsencrypt/dhparam.pem 2048 openssl dhparam -out /etc/letsencrypt/dhparam.pem 2048
``` ```
# 使用证书 ## 使用证书
- nginx 配置 ssl - nginx 配置 ssl
``` ```
server { server {