1. 程式人生 > >Nginx+nodejs反向代理使用https 設定

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;

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