Spaces:
Sleeping
Sleeping
MZhao
commited on
Commit
•
91970a2
1
Parent(s):
3fe8aa3
简化配置SSL方法
Browse files
README.md
CHANGED
@@ -229,42 +229,7 @@ map $http_upgrade $connection_upgrade {
|
|
229 |
}
|
230 |
```
|
231 |
|
232 |
-
|
233 |
-
|
234 |
-
将上述配置文件中的
|
235 |
-
|
236 |
-
```nginx
|
237 |
-
server {
|
238 |
-
listen 80;
|
239 |
-
server_name /域名/; # 请填入你设定的域名
|
240 |
-
access_log off;
|
241 |
-
error_log off;
|
242 |
-
location / {
|
243 |
-
...
|
244 |
-
}
|
245 |
-
}
|
246 |
-
```
|
247 |
-
|
248 |
-
改为
|
249 |
-
|
250 |
-
```nginx
|
251 |
-
server {
|
252 |
-
listen 443 ssl;
|
253 |
-
ssl_certificate /etc/nginx/ssl/你的证书;
|
254 |
-
ssl_certificate_key /etc/nginx/ssl/你的证书私钥;
|
255 |
-
server_name /域名/; # 请填入你设定的域名
|
256 |
-
access_log off;
|
257 |
-
error_log off;
|
258 |
-
location / {
|
259 |
-
...
|
260 |
-
}
|
261 |
-
}
|
262 |
-
```
|
263 |
-
|
264 |
-
其中 `你的证书` 和 `你的证书私钥` 需要自行申领,具体方法请参考:
|
265 |
-
[acme.sh - 说明](https://github.com/acmesh-official/acme.sh/wiki/%E8%AF%B4%E6%98%8E)
|
266 |
-
|
267 |
-
</details>
|
268 |
|
269 |
</details>
|
270 |
|
|
|
229 |
}
|
230 |
```
|
231 |
|
232 |
+
为了同时配置域名访问和身份认证,需要配置SSL的证书,可以参考[这篇博客](https://www.gzblog.tech/2020/12/25/how-to-config-hexo/#%E9%85%8D%E7%BD%AEHTTPS)一键配置
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
|
234 |
</details>
|
235 |
|