wilon.github.io icon indicating copy to clipboard operation
wilon.github.io copied to clipboard

本地配置https

Open wilon opened this issue 5 years ago • 0 comments

  1. go get github.com/FiloSottile/mkcert

  2. mkcert -install

  3. mkcert example.com "*.example.com" example.test localhost 127.0.0.1 ::1

    会生成example.com+3.pem example.com+3-key.pem

  4. 配置 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;
  1. 重启 Nginx,浏览器验证

wilon avatar Apr 24 '20 02:04 wilon