The current situation is like this, my nginx is configured!
But I am not familiar with forwarding, and I have not been successful in finding information!
I have A domain name www.a.cn main website
Then the request from main site A has to go to sites B and C. Since the second-level domain name is cross-domain, please complete the front-end and back-end requests!
I want to forward
www.a.cn/api/xxx/xx
to
api.a.cn/api/xxx/xx
Forward
www.a.cn/user/xxx/xx
to
api.a.cn/user/xxx/xx
Forward
www.a.cn/mch/xxx/xx
to
mch.a.cn/mch/xxx/xx
Thank you everyone, who has complete nginx configuration information online?
Try it