在http{ ... }  中间加入

# HTTPS server
    #
    server {
       listen       4343 ssl;
       server_name  域名;

       ssl_certificate      D:/SoftWare/nginx-1.16.1/cert/Nginx/1.crt;
       ssl_certificate_key  D:/SoftWare/nginx-1.16.1/cert/Nginx/2.key;

       ssl_session_cache    shared:SSL:1m;
       ssl_session_timeout  5m;

       ssl_ciphers  HIGH:!aNULL:!MD5;
       ssl_prefer_server_ciphers  on;

        location / {
            proxy_pass http://localhost:8080;
            
        }
    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    }
1.crt和2.key 是从你从域名中下载一个免费一年证

 

相关文章:

  • 2021-05-28
  • 2022-12-23
  • 2021-11-03
  • 2022-01-27
  • 2021-08-05
  • 2021-12-18
猜你喜欢
  • 2022-12-23
  • 2021-09-03
  • 2022-02-10
  • 2022-01-27
  • 2021-08-25
  • 2021-12-27
  • 2022-02-05
相关资源
相似解决方案