Nginx服务系列——代理
代理
【反向代理配置】
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
相关推荐
yanghui0 2020-06-20
sicceer 2020-05-28
似水流年梦 2020-05-12
gdb 2020-05-08
zhaolisha 2020-05-06
wanghongsha 2020-04-19
hygbuaa 2020-02-26
用不完的好奇心 2020-02-13
wanghongsha 2020-01-17
zhglinux 2020-01-09
zhaolisha 2019-12-21
powerfj 2019-11-19
hygbuaa 2019-11-18
笑面依旧 2019-11-17
一世为白 2019-11-16
OwenJi 2019-11-15