Hosting multiple servers

i am trying to host multiple servers off 1 ip (different ports)
i am trying to use Nginx to pass connections from domain to server 1
and 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?

Your firend here is DNS, and SRV records:

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