nginx 1.6.1版本配置https

采坑,1、不用ssl on;

           2、listen 443 后面要加ssl;

server {
        listen 443 ssl;
        server_name www.aaaa.com;
        root html;
        index index.html index.htm;
        server_tokens off;
        ssl_certificate   cert/2912399487.pem;
        ssl_certificate_key  cert/2912399487.key;
        ssl_session_timeout 5m;
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;
        location  /kkmobile/  {
                proxy_pass      http://127.0.0.1:8084/kkmobile/;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Real-Port $remote_port;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
    }

 

你可能感兴趣的:(负载代理,nginx)