I have two servers running Debian with Virtualmin/Webmin and I wanted to look how can I redirect a subdomain, like a.example.com to my second server. In example:

I have a.example.com on the first server, IP address 192.168.1.20

I have a second server with IP address 192.168.1.21

My router is set to redirect connections to 80 port the first server IP (192.168.1.20), but when accessing a.example.com how can I do so Apache redirects it to the second server (192.168.1.21)?
Thanks a lot :D

EDIT: exactly, thats the way i would do it
–
Thomas BergerJun 28 '11 at 9:06

Yep I know, but then I should add entries to the main server's hosts file so second server can recognize it. EDIT: thinking about it I think maybe not, but not sure as I don't have the server her right now, will mark as answer
–
pmerinoJun 28 '11 at 9:08