This commit is contained in:
2021-11-14 15:50:55 +08:00
parent f810ebf1d9
commit 915c231124
27 changed files with 1862 additions and 1890 deletions

View File

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