Inside the vaddvhost Command

The vaddvhost command greatly simplifies the process of setting up <VirtualHost> entries in your /usr/local/www/conf/vhosts.conf file. It is important, however, to understand the changes made to your configuration files, in case you ever need to edit them.

vaddvhost makes the following changes when adding a virtual host:

<VirtualHost acme.com>

DocumentRoot /usr/local/www/vhosts/acme.com/htdocs

ServerName acme.com

ServerAlias www.acme.com

ServerAdmin webmaster@acme.com

LogFormat COMBINED

ErrorLog /usr/local/www/vhosts/acme.com/logs/error_log

TransferLog /usr/local/www/vhosts/acme.com/logs/access_log

HostNameLookups off

<Directory "/usr/local/www/vhosts/acme.com/htdocs">

  Options All

  AllowOverride All

  Order allow,deny

  Allow from all

</Directory>

<Directory "/usr/local/www/vhosts/acme.com/cgi-bin">

  AllowOverride None

  Options None

  Order allow,deny

  Allow from all

</Directory>  

</VirtualHost>

<Directory "/usr/local/www/vhosts/acme.com/cgi-bin">

  AllowOverride None

  Options None

  Order allow,deny

  Allow from all

</Directory>