1. Default vserver configuration
  2. Individual vserver configuration
    1. Configuring interfaces and IPs
    2. Configuring vserver hostname
    3. Configuring mounts
    4. Configuring logging

Default vserver configuration

The vserver utilities store the global default configuration options in the /etc/vservers/.default hierarchy. See the vserver configuration documentation located in the Reference section for more information

Individual vserver configuration

The individual vservers each have their own configurations on the host located in /etc/vservers/$vservername, this directory has a number of configuration options.

Configuring interfaces and IPs

If you did not build your vserver with an interface, you can make one and give it an IP by creating a device directory and then putting the IP and the netmask in the correct files (in this example we assign eth0 the IP 69.90.134.220/25):
# mkdir /etc/vservers/$vservername/interfaces/0
# echo "eth0" > /etc/vservers/$vservername/interfaces/dev
# echo "69.90.134.220" > /etc/vservers/$vservername/interfaces/0/ip
# echo "25" > /etc/vservers/$vservername/interfaces/0/prefix

Configuring vserver hostname

If you want to change the vserver hostname you can do it as follows:
# echo "hostname" > /etc/vservers/$vservername/uts/nodename

Configuring mounts

If you want to mount a directory in a vserver you can edit that vserver's fstab which is located in /etc/vservers/$vservername/fstab For example, if the directory /var/www/website is in the vserver called "drupal" we want to make this directory available in the vserver "flathtml" in directory /var/www/website, you can add the following in /etc/vservers/flathtml/fstab:

/vservers/drupal/var/www/website /vservers/flathtml/var/www/website     auto    rbind   0 0

Configuring logging

If you are using syslog-ng you can make a source line from each vserver in your syslog-ng.conf so that all logs for every vserver get logged in one place: by specifying /$vrootdir/$vservername/dev/log: Example:
source s_vserverdrupal { unix-stream("/vservers/drupal/dev/log"); };
destination m_vserverdrupal { file("/var/log/messages/drupal"); };