http_proxy

server {
    resolver 114.114.114.114;  # DNS 解析 IP 地址
    resolver_timeout 8s; # 超时时间


    listen       9180 backlog=8192;
    server_name  proxy.kisops.com;


    if ($host !~ (item.taobao.com|www.ip138.com)){
        return 403;
    }


    charset utf-8;


    location / {
        proxy_pass $scheme://$http_host$request_uri; 
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;  
        proxy_set_header REMOTE-HOST $remote_addr;  
        proxy_set_header X-Forwarded-For $remote_addr;  
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 


        proxy_buffers 1024 8k;
        proxy_max_temp_file_size 0;
        proxy_headers_hash_bucket_size 512;
        proxy_headers_hash_max_size 4096;
        client_max_body_size 1g;
        proxy_connect_timeout 30;


        proxy_redirect off;  
        proxy_cache_valid any 0;
    }
}

你可能感兴趣的:(http_proxy)