nginx 代理笔记
限制上传大小
client_max_body_size 10240m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 21600;
proxy_read_timeout 21600;
fastcgi_buffers 8 128k;
send_timeout 60;
nignx 正向代理
http {
upstream aipf-web-ccb {
server naipftest.ccb.com:30020
}
}
{
proxy_pass http://aipf-web-ccb;
proxy_set_header Host naipf.ccb.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
nginx 反向代理
proxy_pass http://$http_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;