nginx

nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server, originally written by Igor Sysoev.

Reverse proxy configuration

 server {
        server_name subdomain1.example.com;
        location / {
            proxy_pass       http://hostname1:port1;
        }
 }
 server {
        server_name subdomain2.example.com;
        location / {
            proxy_pass       http://hostname2:port2;
        }
 }