server {
listen 8883;
server_name www.test.com;
location / {
proxy_pass https://www.baidu.com;
}
}
server {
listen 8883;
server_name apim.sit.com;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
proxy_pass https://10.67.230.13;
proxy_set_header Host api-data-backend.xx.com;
}
}
这样当post man里面输入的host不同时,即可导流到不同的网站