希望访问http://status.sinson.org/test/dashboard/index
时nginx代理到http://center.szuswzx.com/center/dashboard/index
设置如下:
location /test/{
if ($request_uri ~* "status\.sinson\.org/test/(.*)"){
proxy_pass `http://center.szuswzx.com/center/$1`;
}
}
但是实际上报的error是找不到test/dashboard/index.html
明显没有做到代理,求问原因?怎么样设置才能获取到dashboard/index
然后转发到http://center.szuswzx.com/center/$1
把这条location放到最前试试