proxy_redirect
此命令用于重置标头信息中“位置”和“刷新”的值。
语法proxy _ redirectredirectreplacement; br/proxy_redirect default; br/proxy_redirect off; 默认值proxy_redirect default; 位置http、服务器、位置”为什么要使用这个命令?
服务器端[192.168.200.146]
服务器{ listen 8081; server_name localhost; if (! - f $ request _ filename (return 302http://192.168.200.146; }代理服务器端[192.168.200.133]
服务器{ listen 8081; server_name localhost; location/{ proxy _ pass http://192.168.200.14633608081/proxy _ redirect http://192.168.200.1463http://192.168.200 }”此命令的几个选项
proxy _ redirectredirectreplacement;
redirect:目标,位置值replacement:要替换的值proxy_redirect default;
默认; 将location块的uri变量作为replacement,proxy_pass变量作为redirect,proxy_redirect off;
关闭proxy_redirect的功能