帮忙看个 反向代理的问题? 看rewrite日志 发现根本就没匹配到
需求:aa.xiao.com/heihei.html反向代理b.com/aa/heihei.html (页面要显示aa.xiao.com/heihei.html)问题:看rewrite日志 发现根本就没匹配到谁能帮忙看下 多谢
location /heihei.html {
if ( $http_host ~ "([^.]+)\.xiao\.com" ) {
set $host_var $1;
rewrite ^/heihei\.shtml$ /$host_var/heihei.html break;
proxy_pass http://b.com;
}
proxy_set_header Host b.com
}
页:
[1]