Nginx+nodejs反向代理使用https 设置


如下:  
nginx server 443 设置如下: 

#
server {
    listen       443 ssl;
    server_name  api;
    #ssl          on;
    #aerchi.com.cert.pem
    ssl_certificate     /usr/local/websites/cert-ssl/api/public.pem;
    #aerchi.com.cert.key
    ssl_certificate_key  /usr/local/websites/cert-ssl/api/key.key;

    access_log  /var/log/nginx/api.access.log;

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

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

    #禁止访问 .htxxx 文件
    location ~ /.ht {
        deny all;
    }

    location / {
        proxy_pass   http://127.0.0.1:3389;
        #root   html;
        #index  index.html index.htm index.php;
    }
}

 

你可能感兴趣的:(Centos+Unix)