Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 27th October 2006, 19:40
wyzzkid wyzzkid is offline
Junior Member
Join Date: Oct 2006
Posts: 5
Thanks: 1
Thanked 2 Times in 1 Post
Question Multiple Physical Hosting Servers Sharing IP


Like most people I will apologise in advance if this is in the wrong forum; I have spent weeks reading thru all the how-to's (brilliantly written, and most educational,) trying things out, and reading thru the fora (also educational,) so I am reasonably confident no one asked this before,
I am also reasonably confident that there are a few peeps that would like to do this, and when I get this all figured out and working, with your help, I will happily package it up into a giant how-to for your posting pleasure
so here goes...

I have 3 questions semi-related, so I will ask together;


Like many, I am behind a NAT router that gets one dynamic IP (eventually this setup will move to a location with a real static IP); there are three physical hosts on the inside, each running their own webservers, etc; there are several domains at dyndns.org so that they all point here; if there is only one physical host, with ISPConfig, everything makes sense; but now I don't how to make the select domain go the right physical host;

considerations, and things I have tried (at least partially):
·I dont want to use non-standard port numbers, for forwarding;
·pretty sure that each machine needs its own ISPConfig to administer the vhosts on that machine
·multiple routers to separate private networks
·if it makes anything inherantly easier, using 10.x.y.z, or any other private pool set, that is ok too
·considering using xen to help with all this
·separate nameserver on inside on one of the physical hosts to make sure everything coming in works

so, more specifially, the router has dhcp 192.168.1.x /24 for windows computers for the kids, with pool from .100 to .200;
each physical host is statically assigned an IP, and (and that machine can `admisiter`10 IPS internally to `assign` an IP to the vhost)

the below assumes that example.com is a real reg'd domain; and that example.myphotos.cc and example.mine.nu are free services from dyndns.org

host1: kids.example.com hosts each kid's own domain from a dyndns.org pool, hence: kid1.example.myphotos.cc, kid2.example.myphotos.cc, or kid1.example.mine.nu, etc) the dns records at dyndns have the wildcard set, so any host at example.myphotos.cc (/etc/interfaces listens on .20 to .29, so that each kid may later have his/her own IP)

host2: testing.example.com hosts real domains while they are being built and tested, until they such time as they are moved to the real permanent host - considering xen for this purpose, so that each real test is in its own space, in which case each DomU will get one IP .31, .32 etc

host3: another.example.com will host the real domains, (soon to be moved to a different location with a static IP)

so the question is,,, can it be done? (of course, but..)
the BIG question is,,, can it be done EASILY ? and can anyone help

QUESTION 1: how do I get each domain coming in thru the router to go the correct physical host ? can one nameserver administer all this ? and can one of the others be a backup nameserver?
with ISPConfig on each host, they all are running BIND, so one of them can be the nameserver to direct all incoming requests (port fwd from router?) to the appropriate phys host, but I dont know to set that up properly

QUESTION 2: when I was trying things out with ISPConfig, and using the co-domains and forwarding, I could not achieve the goal I wanted; the plan for any given site, example.com is to have directories inside of .../web that can be used as whatever.site.com, and have it show up in the address bar that way; hence: for a system the first vhost's web folder is at /var/www/web1/web (I see that ISPConfig puts in symlinks for the co-domains forwarding), so that hosted site was ex1.com, if I have web/index.html and web/forum/index.php, and web/test/index.php, I want to be able to use ex1.com (or www.ex1.com), and test.ex1.com and forum.ex1.com, but so far no matter how I do this, although it accepts and delivers the page, the address bar shows: www.ex1.com/test/;
similar for users of the domain, can user show up as user.ex1.com instead of www.ex1.com/~user ?

QUESTION 3: when all this is done, (hopefully soon with your help, and I finally get to move it to a static location, the guy there said I could use his nameserver as my secondary, and I only had to run one, since I will only have one static IP from his block; how do I get my nameserver to pass its zone info to his, or need he do something to his for this to happen?

I hope the verbose post makes it clear;
Reply With Quote
Sponsored Links
Old 28th October 2006, 04:10
djtremors djtremors is offline
Senior Member
Join Date: Apr 2006
Location: Sydney
Posts: 278
Thanks: 0
Thanked 12 Times in 10 Posts

I haven't read your full post as I'm in a rush to search something before I got out onsite.. but this may be what you want after a glance through your issue.

Just create a VirtualHost (Or ISPC website) for each of the domains you want and using NameVirtualHost would match each by the requested hostname ( www.yourdomain.com)

In the HTTPD Includes add the following for each and change the IP as such.
PHP Code:
ProxyRequests Off
ProxyPreserveHost On 
You will need the ProxyPreserveHost to retain the hostname variable so most applications that use it report the proper information (ie. php's $_SERVER['SERVER_NAME'] )

each proxy forward virtual host points to all the servers and it works fine.
The only other thing you want is probably to patch the ispc so the VirtualHosts listen to *:80 which is not _really_ required but makes maintaining the DNS with a private IP easier.

btw, the router can't determine the sites without inspecting the packets.. you need a forwarding proxy (or a master ISPC server to handle all connections and forward to the correct server once it knows which site and where to redirect the requests)...

gotta go, wife bitching to leave.

Last edited by djtremors; 28th October 2006 at 04:12.
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig on multiple servers Piccent Installation/Configuration 4 26th March 2010 14:24
Multiple Servers / Dedicated Tasks ( Bind, Postfix ) Mr.Mr Installation/Configuration 1 18th July 2006 13:27
Multiple servers nenad General 1 27th April 2006 16:10
Configure two servers with virtual hosting gimhan90 Installation/Configuration 1 23rd February 2006 16:01
Multiple physical servers BommelFly Installation/Configuration 1 7th October 2005 13:34

All times are GMT +2. The time now is 07:40.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.