使用nginx配置代理服务器的方法

/ nginx / 没有评论 / 420浏览

    server {
        access_log  logs/proxy808.access.log  main;
        resolver 8.8.8.8;
        resolver_timeout 5s;
     
        listen 0.0.0.0:8089;
     
        location / {
            proxy_pass $scheme://$host$request_uri;
            proxy_set_header Host $http_host;
     
            proxy_buffers 256 4k;
            proxy_max_temp_file_size 0;
     
            proxy_connect_timeout 30;
     
            proxy_cache_valid 200 302 10m;
            proxy_cache_valid 301 1h;
            proxy_cache_valid any 1m;
        }
    }