I am putting together a VPS that will have 3 virtualized servers using the VB virtual machine.
Each machine has a distribution of Ubuntu Server 14.04 installed that executes some services built by me in java that listens to certain ports requests.
I have a single certified IP, 2 domains and a sub-domain.
Both the 2 domains and the sub-domain point to the certified IP that is attached to a firewall and then redirect the ports to one of the virtual servers.
But my need is this:
dominioA.com --- servidor1 (10.1.1.2)
dominioB.com --- servidor2 (10.1.1.3)
sub-dominio ---- servidor3 (10.1.1.4)
As it is not HTTP traffic I can not use the reverse Apache proxy.
My question is, how do I redirect, depending on the domain, to my local servers (IPs)?
I understand that with a DNS server that is achieved, so I enabled a 4 a virtual machine with Ubuntu Server and bind9, I tried to document, I made some tests and I can not get it to work .
So I hope someone with knowledge or experience will shed more light on the possible solution.