map $host $xxhost{
~(.*).123.com $1.456.com;
}
server
{
listen 80;
server_name 123.com *.123.com;
location /
{
proxy_pass http://www.456.com/;
proxy_set_header Host $xxhost
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding ""; #清除编码 防止GZIP的站无法替换
}
access_log off;
}
欢迎光临 全球主机交流论坛 (https://ddzzz.eu.org/) | Powered by Discuz! X3.4 |