Forum Moderators: phranque

Message Too Old, No Replies

Newb - Subdomain port/IP forwards

Port forward

         

BertTr

1:27 am on Sep 21, 2011 (gmt 0)

10+ Year Member



Hi Everyone,

I've been trying for a long while to transfer requests from subdomains to various IP's and ports.

I have a few sub domains setup at my provider:

sub1.mydom.com, sub2.mydom.com, sub3.mydom.com (for example).

I'd like for (e.g.):
sub1.mydom.com to go to server1, port 8181
sub2.mydom.com to go to server1, port 8188
sub3.mydom.com to go to server2, port 100

I've installed Tomcat so that all port 80's will be routed to it. But question is, how do I forward the requests to the correct server/port based on the incoming subdomain?

I'm very new at this, and I've done some searching and saw the proxy_pass and proxy_passreverse directives, but the description doesn't seem to describe what I want it to?

Any help would be appreciated!

Thanks in advance.

phranque

12:41 pm on Sep 24, 2011 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld, BertTr!

in think you'll get some solutions in VirtualHost Examples - Apache HTTP Server:
http://httpd.apache.org/docs/2.0/vhosts/examples.html [httpd.apache.org]