Multi domain support

I I have two domain names: www.a.com and www.a.cn
The default domain name for doc server is doc.a.com,
doc.a.cn can be accessed through nginx proxy_pass to doc.a.com,
doc.a.com is working properly ,doc.a.cn page can be displayed normally but document cannot be created or opened properly. We found that when accessing doc.a.cn, it is still accessing doc.a.com internally
How to make both domains accessible normally?