HTTP redirection

I have a server that I want to run multiple websites on, i can point the domains at the IP address, however i want to redirect to a different xojo web application for each site, each would run on a stand alone webserver on a different port. I am looking for a way to figure out what website the request is for and point to the specific web instance and port.

I though nginx would help here, but I could not get it to work. Anyone know how to achieve this?

You should be able to do this with rewrite rules. https://www.nginx.com/blog/creating-nginx-rewrite-rules/

I like haproxy for this sort of thing. You can search the forum or google for more info. There are a few basic tutorials out there for it.