以下代码为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;
        }
    }

}

 

posted on 2015-01-06 19:01  飞儿传媒  阅读(444)  评论(0)    收藏  举报
飞儿传媒