首页 > 其他 > 详细

nginx后端转SSL接收前端请求

时间:2015-01-06 19:56:36      阅读:306      评论:0      收藏:0      [点我收藏+]

以下代码为nginx.conf文件内容

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    # NginxHttpRealIpModule
    set_real_ip_from 10.96.0.0/16;
    set_real_ip_from 122.10.113.144;
    real_ip_header X-Real-IP;

    keepalive_timeout  65;
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Accept-Encoding "";
    proxy_set_header Connection "keep-alive";
    server {
        listen       443 ssl;
        ssl_certificate      cert.pem;
        ssl_certificate_key  cert.key;
        location / {
            proxy_pass http://127.0.0.1;
        }
    }

}

 

nginx后端转SSL接收前端请求

原文:http://www.cnblogs.com/firadio/p/4206746.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!