- 获取脚本
git clone https://github.com/wsdo/local-https-cert.git
cd local-https-cert
- 生成本地的RootCA:
sh createRootCA.sh


1.输入一个秘密(随便输入,但是要记住)
2.输入刚才的秘密(和上面秘密要一致)
- 创建根证书
sh createCertificate.sh

- 让打开RootCA改成始终信任
点击

点击login 输入上面生成证书的秘密



nginx
# HTTPS server
server {
listen 443 ssl;
server_name shudong.wang;
ssl_certificate ssl/www.server.crt;
ssl_certificate_key ssl/www.server.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
# try_files $uri $uri/ /index.html;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8000/;
}
}
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。