From: Herbert P÷tzl (herbert_at_13thfloor.at)
Date: Thu 10 Jul 2003 - 03:07:59 BST
On Wed, Jul 09, 2003 at 06:05:32PM -0700, gdecourt_at_yahoo.com wrote:
> Hi there,
> I was thinking how to host vservers in a computer
> that has just one IP address in internet...and after A
> LOT OF RESEARCH in internet and in the archives if the
> list, I think I got a solution for my needs.
obviously not enough research though ...
> I'm not sure If it will work, but here it is:
> First of all I will create virtual interfaces in my
> machine and apply different IP addresses for that
> interfaces (configuring them in ifconfig, after that I
> will use the the route command to add the interfaces
> in the network...). After the creation of that virtual
> interface I will need to configure the eth0 that has
> the internet IP to it be a "real" router, so that IP
> of the virtual interface may now be working fine in
> the network... So, after that, I set the "virtual" IP
> for a vserver.
> So...what do you think? Maybe it can be a solution to
> have all the vservers doing their apache duties in the
> port 80 of that virtual IPs...so when somebody access
> the IP in internet, all the vservers may be checking
> their name-based configs to answer for that domain...
sorry to tell you, but this _can not_ work ...
if I silently ignore the routing issue, which
is totally absurd ...
- name based virtual web hosting is a feature
where the web server blindly accepts the
connection, later get a request, containing
the domain and a path within that domain,
and after that decides which pages to provide.
> Actually, If possible, please somebody tell me an
> easy way to the router thing (didn't find anything
> about it in the archives).
what you _can_ do, is the following:
- setup a proxy web server, which does the
connection thing on port 80, and forwards
the actual request based on the domain
to one of many local configured apaches
- configure each vserver to use 10.0.x.x
with an apache listening on port 80 and
use those addresses in the proxy ...
no special routing would be required, although
you'll realy get into trouble if you want
to provide ssl (https) or ftp access ...