Hosting multiple servers

Hello
i am trying to host multiple servers off 1 ip (different ports)
i am trying to use Nginx to pass connections from domain
xyz.net to server 1
and
123.net to server 2
Nginx seems to only allow me to pass to http based addresses
how do i change this so i can pass to localhost:port with no http/https prefix?
thanks
MrWhale

Your firend here is DNS, and SRV records: https://www.namecheap.com/support/knowledgebase/article.aspx/9765/2208/how-can-i-link-my-domain-name-to-a-minecraft-server

worked it out thanks for quick response. was trying to use Nginx didnt work.
its funny you link namecheap. happens to be the provider of my domain lol