wilon.github.io
wilon.github.io copied to clipboard
本地配置https
-
go get github.com/FiloSottile/mkcert -
mkcert -install -
mkcert example.com "*.example.com" example.test localhost 127.0.0.1 ::1会生成
example.com+3.pem example.com+3-key.pem -
配置 Nginx
server_name localhost;
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /your_cert_path/example.com+3.pem;
ssl_certificate_key /your_cert_path/example.com+3-key.pem;
- 重启 Nginx,浏览器验证