nginx可以转发内网 url东西。有两种方法:

1、去掉匹配路径转发

匹配规则通常为二级路径,转发的时候过滤掉。

# 转发示例: # 请求:http://somedomain.com/system/path/request # 转发:http://otherdomain.com/path/request # location ^~ /system/ { proxy_pass http://otherdomain.com }

2、完整路径转发

匹配规则二级路径转发的时候也带上。

# 转发示例 # 请求:http://somedomain.com/system/path/request # 转发:http://otherdomain.com/system/path/request # location ^~ /system { proxy_pass http://otherdomain.com }