vaddhost - Automatically Configure Virtual Subhosts

The vaddhost utility is an interactive, command-line program that automates the process of configuring Virtual Subhosts. After launching vaddhost, it will ask you several questions about the configuration of your Virtual Subhost and provide you with default responses. As you answer each question, vaddhost will display the <VirtualHost> definition with each new piece of information.

Once you have responded to all questions, vaddhost will create necessary directories, add the <VirtualHost> entry to your main web server configuration file (~/www/conf/httpd.conf), and create a backup of your old ~/www/conf/httpd.conf file in your ~/www/conf directory. You can remove these backup files at your discretion.

To use vaddhost, connect to your Virtual Private Server via SSH, su to root, and do the following:

  1. Add your domain to our name servers

  2. Add the primary user

    Run the vadduser command to add the primary user for this virtual host. You will want to create a unique username, and not a generic one (e.g. webmaster, as the Virtual Host will be tied to this username). Permissions MUST include web for this user to have Virtual Hosting.

    Virtual Hosting is created in a specified user's www directory. Each web-enabled user account is capable of managing multiple Virtual Hosts.

    # vadduser
  3. Launch vaddhost

    Run the vaddhost command.

    # vaddhost