0.proxy_redirect
如果需要修改從被代理服務器傳來的應答頭中的"Location"和"Refresh"字段,可以用這個指令設置。 假設被代理服務器返回Location字段為: http://localhost:8000/two/some/uri/ 這個指令: proxy_redirect http://localhost:8000/two/ http://frontend/one/; 將Location字段重寫為http://frontend/one/some/uri/。 在代替的字段中可以不寫服務器名: ———————————————— https://blog.csdn.net/u010391029/article/details/50395680 參數off將在這個字段中禁止所有的proxy_redirect指令:
1.配置
在nginx配置https server { listen 443 ssl http2; ssl certificate /a.crt; ssl_cerficate_key /a/key; ssl_session_timeout 20m; ssl_session_caqche shared:SSL:10m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; location / { proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://wwlproxy; } }

2.NGINX的proxy_redirect功能比較強大,其作用是對發送給客戶端的URL進行修改
