One server, two containers with nginx deployed, has resolved the two domain names. Do you want to access the two containers separately without adding ports?

  docker, question

I ran two containers of nginx on a vps and pointed out two domain names to this server. I think these two domain names correspond to two containers respectively. How can I make these two domain names directly accessible without input port?

You need to run a real nginx (not nginx container) on this server to act as a reverse proxy, configure two servers in this real nginx setting, declare your two domain names separately, and forward the request to nginx of the two containers.

Please refer toThis link