nginx规则

upstream bolate{
    server 192.168.122.20:80;
}

server{
    listen 80;
    server_name www.baidu.com.cn;
    location / {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_set_header X-Nginx-Proxy true;

        proxy_pass http://bolate;
        proxy_redirect off;
    }
}

  

posted @ 2019-10-18 10:03  caonw  阅读(208)  评论(0编辑  收藏  举报