Re: [vserver] vserver basics - virtual web hosting

About this list Date view Thread view Subject view Author view Attachment view

From: Herbert Poetzl (
Date: Tue Aug 06 2002 - 19:16:02 EDT

On Tue, Aug 06, 2002 at 02:15:20PM -0700, Ian Douglas wrote:
> > > On the main server, if I run 'setup' (RedHat 7.3), I see the typcial
> > > services, httpd, named, sendmail, etc., and then v_httpd,
> > v_sendmail. On the
> > > MAIN server, should I UN-select the httpd/sendmail services and
> > only run the
> > > v_ services?
> >
> > The v_ services, does, as far as i understand,
> > the same as the other,
> > except it starts the service inside a vserver.
> > You could do a vserver enter.

hmm, thats not exactly what they do ...

lets take a look at v_httpd:

# description: Wrapper to start httpd bound to a single IP
if [ -f /etc/vservices/httpd.conf ] ; then
    . /etc/vservices/httpd.conf
exec /usr/sbin/chbind --ip $IP /etc/init.d/httpd $*

the chbind tool binds (reduces) the ip address(es) to
the given one --ip <ip1> and calls the _original_
script to start their service ...

> So the main server should just run "httpd" and
> the others shoudl run "v_httpd" ?

so short answer to your question:
- call v_xxx in your main server to limit
  the services to the given ip(s)
- call xxx in your virtual servers because
  the chbind is already in effect

because I often have more than one interface
ative for the main server, I modified the
v_xxx scripts to use the new features of
binding to more than one ip address ...

for example for the v_sshd script ...

IP="eth0 eth1"
IPC=`for n in $IP; do echo "--ip $n"; done`
if [ -f /etc/vservices/sshd.conf ] ; then
   . /etc/vservices/sshd.conf
exec /usr/sbin/chbind $IPC /etc/init.d/sshd $*

> > Give all your vservers a different name, and
> > show that name in the prompt.
> Yeah, already figured that one out after removing
> all those RPM files...
> /sigh

good idea *G*


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.4 : Mon Aug 19 2002 - 12:01:01 EDT