From: George (thumper_at_acun.com)
Date: Mon 19 Aug 2002 - 21:18:54 BST
Paul;
Thank you for your response.
I have 3 SSL sites (each with there own ip) and many Name Based sites running
on one ip.
In my test setup I have:
I have IPROOT="208.153.105.17 208.153.105.18 208.153.105.19"
when starting the vserver, it identifies that it is using the virtual
addresses.
this is what starts my ips up when my vserver starts.
pre-start)
/sbin/ifconfig eth0:vw01 208.153.105.17 netmask 255.255.255.240
/sbin/ifconfig eth0:vw02 208.153.105.18 netmask 255.255.255.240
/sbin/ifconfig eth0:vw03 208.153.105.19 netmask 255.255.255.240
;;
Normally I use:
NameVirtualHost 208.153.105.19
<VirtualHost www.somedomain.com>
</VirtualHost>
Which works well on the old server, and that I want to move into a vserver and
retire the old beast.
and I also tried it as you displayed below, but apache never binds to the
other 2 ips. A port scan reveals port 80 is not listening.
btw I'm using kernel 2.4.19ctx-13
Thank you for the tips on ip conservation, I'm well aware of them, and I am
familure with the conf options, I've been using linux since 1995, along with
apache, etc.
I've been looking for a sane vserver implimentation for some time, and I
beleve this is it. I have several vservers running, and working well.
This one, where I really need several IP's in one vserver is making my brain
swell.
George
On Monday 19 August 2002 6:10 am, Paul Sladen wrote:
> On Sun, 18 Aug 2002, George wrote:
> > [...] Apache refuses to bind to anything other that the first ip listed,
> > VirtualHost, Listen and BindAddress refuse to listen to any other ip
> > than the first one listed.
>
> Binding to `0.0.0.0' binds *only* to the first address in a vserver--always
> has done. To use extra IP addresses you have to put multiple
> <VirtualHosts>:
>
> <VirtualHost 192.168.0.42> # Site on first IP
> </VirtualHost>
> <VirtualHost 192.168.0.42> # Another site on first IP
> </VirtualHost>
> <VirtualHost 192.168.0.42> # Third first IP
> </VirtualHost>
> <VirtualHost 192.168.0.43> # Fourth site Second IP address
> </VirtualHost>
>
> As you may have noticed it is possibley to run multiple websites on a
> single IP address (!). Unless you are serving SSL websites there is
> probably no reason to be using more than one IP address.
>
> IP address space is a *scarce resource*, please use it *very carefully*.
>
> > I'm starting apache with apachectl not v_httpd, I know already that it
> > binds to a single ip.
>
> v_httpd is a kludge because people want to run apache on the *host* server
> aswell. If people would stop doing this, it could go away
> completely--don't use it in a vserver.
>
> -Paul