Forum Moderators: phranque

Message Too Old, No Replies

Multiple servers behind router, same static IP?

subdomains hosted locally, main site hosted elsewhere

         

whoisgregg

3:43 am on Jun 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello! I feel like a complete newbie asking this question, but for some reason I just have a mental block figuring out this particular thing. I thought this thread [webmasterworld.com] (msg #14) gave me the answer, but I still don't understand it. Here we go:

I have example.com hosted off site with a hosting company. I have a subdomain (sub1.example.com) which is hosted locally. My hosting provider sends sub1.example.com requests to my static IP and my router sends all port 80 requests to a particular machine on my LAN (192.*.*.150) and all is good. It works so smoothly I have 10-15 sites on that server (with virtual name based hosting).

But... now I need a second subdomain (sub2.example.com) and this second subdomain needs to be on a separate machine still on my LAN (192.*.*.151). <sigh> I don't know how to go about this! All the requests are port 80 and my router can only point to one machine. Should it point to a DNS server? Should it point to 192.*.*.150 and that machine automagically sends requests for sub2.example.com to a 192.*.*.151? Do my web servers need to be outside my router? Do I need a better router?

I could use any pointers in the right direction! I am sure this is going to be one of those head slap type answers.

whoisgregg

2:54 pm on Jun 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hmm, maybe this is a lot harder than I thought. That would make me feel better about not being able to figure out myself. Is there additional configuration information that is relevant here? Like, I'm on a *nix type platform running Apache servers?

whoisgregg

5:38 pm on Jun 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I found an application for this that has been documented, setting up a separate webcam server on your lan! Apparently, you can use virtual hosting on one machine and use proxypass in the httpd.conf file to pull all the requests for that subdomain/domain from a different machine. Syntax is like this:

ProxyPass / h*tp://192.1.1.50/

You can also replace the "/" with a specific directory or command and specify a port number in the IP, such as:

ProxyPass /webcam h*tp://192.1.1.50:8000/

(Fix the http part to not have a "*" in it, of course.)

There are caveats to this, you can read more at the page where I read about it:
[linuxfocus.org...]