Nginx配置SSL和反向代理

下载Nginx(这里以Windows为例)

申请SSL证书,我是在腾讯云申请的免费SSL证书

Nginx配置SSL和反向代理_第1张图片

 

# HTTPS server
    #
    server {
        listen       443 ssl;
        server_name  code.******.com;

        ssl_certificate      code.******.com_nginx/code.******.com_bundle.crt;
        ssl_certificate_key  code.******.com_nginx/code.******.com.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://code.******.com:65525;
            root   html;
            index  index.html index.htm;
        }
    }

你可能感兴趣的:(Nginx,ssl,反向代理)