http 反向代理流程





server {listen 80;server_name shop**.com.cn;location /{proxy_pass http://test/www;proxy_http_version 1.1;proxy_set_header Connection "";proxy_method POST;proxy_pass_request_headers off;proxy_pass_request_body off;proxy_set_body 'hello world'; #传入包体 通过抓包查看proxy_set_header name ''; #将自定义头部 name 置空}location /a {proxy_pass http://test/www; //改行会把请求转成 http://test/aproxy_http_version 1.1;proxy_set_header Connection "";}upstream test {server 192.168.0.**:8890 weight=1 ;#keepalive 32;least_conn ;zone backends 64k;}}
