时间:2023-02-08 13:48:01 | 来源:建站知识
时间:2023-02-08 13:48:01 来源:建站知识
一、为什么有这个需求#PROXY-START/location ~* /.(php|jsp|cgi|asp|aspx)${ proxy_pass http://114.*.*.*; proxy_set_header Host 114.*.*.*; # 修改host 原来,绑定的是$host,更改为ip proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header REMOTE-HOST $remote_addr;}location /{ proxy_pass http://114.*.*.*; proxy_set_header Host 114.*.*.*; # 修改host 原来,绑定的是$host,更改为ip proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header REMOTE-HOST $remote_addr; add_header X-Cache $upstream_cache_status; #Set Nginx Cache add_header Cache-Control no-cache; expires 12h;}#PROXY-END/
关键词:使用,方法,外域