代理
【反向代理配置】
proxy_pass url;(location\if in location\limit_except)
【正向代理配置】
resolver 114.114.114.114;(DNS解析地址)在代理的上一级配置
proxy_pass http://$http_host$request_uri;
$http_host => 服务器域名 $request_uri => 路由地址
缓冲区
proxy_buffering on | off;默认打开(http\server\location)
proxy_buffer_size
proxy_buffers 4 128k;
proxy_busy_buffers_size 256k;
proxy_max_temp_file_size 256k;
跳转重定向
【常用默认proxy_redirect default | off | redirect replacement;(http\server\location)
头信息
proxy_set_header field value;(http\server\location)【常需要的配置 Host:$http_host X-Real-IP:$remote_addr;
proxy_hide_header
proxy_set_body
超时
proxy_connect_timeout time;默认60s(http\server\location)
proxy_read_timeout
proxy_send_timeout