//直接跳转
if ($server_port = 9058 ) {
# return 301 https://$host$request_uri;
return 301 http://www.baidu.com;
}
//重定向,不跳转域名,还是原域名
location / {
if ($server_port = 9058 ) {
proxy_pass http://ts.***.***.com:9059;
}
}
location / {
if ($server_port = 9058 )
nginx重定向,根据端口重定向
于 2024-01-16 16:00:11 首次发布