From d5333d442343f04aa33f7d28e0d419988e523e16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E6=A5=9A?= <771730766@qq.com> Date: Fri, 23 Sep 2022 11:21:29 +0800 Subject: [PATCH] =?UTF-8?q?Updated=20=E6=80=8E=E4=B9=88=E5=BC=80=E5=90=AFh?= =?UTF-8?q?ttps=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD=20(markdown)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 怎么开启https相关功能.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/怎么开启https相关功能.md b/怎么开启https相关功能.md index 8acd669..c869c92 100644 --- a/怎么开启https相关功能.md +++ b/怎么开启https相关功能.md @@ -71,7 +71,25 @@ cp ~/Downloads/8516590_test.zlmediakit.com_nginx/default.pem ./ ## 五、测试 -- 如果你的开发机的ip并不是证书绑定域名映射的ip +- 如果你的开发机的ip并不是证书绑定域名映射映射的ip,那么可以通过修改host文件来实现测试, 以linux/mac为例: + +```bash +#打开host文件 +sudo vi /etc/hosts +#新增内容(本机ip+空格+你的域名) +127.0.0.1 test.zlmediakit.com +#修改后保存退出vi +``` + +- **打开浏览器输入https地址测试:** + +![图片](https://user-images.githubusercontent.com/11495632/191885959-5a20f3f7-0b39-4a06-bfaa-35b7a00427b4.png) + +- **查看证书:** + +![图片](https://user-images.githubusercontent.com/11495632/191886289-9c157ea0-2d61-4502-bda6-950832f73a75.png) + +