美文网首页
nginx 配置杂记-3

nginx 配置杂记-3

作者: wo是大富 | 来源:发表于2017-06-10 17:44 被阅读0次

    upstream backend {

    server 1.1.1.1;

    server 2.2.2.2 backup;

    }

    server {

    listen 80;

    server_name xx.xx.com;

    location / {

    set_real_ip_from  3.3.3.3;

    set_real_ip_from  3.3.3.5;

    real_ip_header    X-Forwarded-For;

    real_ip_recursive on;

    proxy_set_header Host $host;

    proxy_set_header X-Real-IP $remote_addr;

    proxy_pass http://backend;

    access_log /data/logs/xx/xx.xx.com.80.log main;

    }

    location = /favicon.ico {

    log_not_found off;

    access_log off;

    }

    }

    相关文章

      网友评论

          本文标题:nginx 配置杂记-3

          本文链接:https://www.haomeiwen.com/subject/tvhcqxtx.html