nginx 使用SSL证书 代理https

 

 

在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 是从你从域名中下载一个免费一年证

 

nginx 使用SSL证书 代理https

上一篇:sqlAlchemy的查询分页和获取总条数


下一篇:PHP开发环境搭建—phpstudy+eclipse+php development tool+xdebug+composer