Virtual Private Server User Guide
The Apache Web Server
If you would like to allow your virtual host to have its own directory for storing and
executing CGI programs, type Y or press ENTER to create a cgi bin directory
within the virtual host s home directory.
Finally, a confirmation message appears, along with instructions to restart Apache
(see the following note for important details).
Note: As stated in the instructions for the vaddvhost program,
you must restart Apache before the changes will take effect. To
restart Apache, use the following command:
> apachectl restart
If you followed all three of the above steps correctly, your virtual host should now
be functioning properly.
Please read the next section to understand the modifications that vaddvhost has
made to your VPS server's configuration files, so that you or another member of
the Webadmin group can modify these settings if needed.
Inside the vaddvhost Command
The vaddvhost command greatly simplifies the process of setting up
entries in your /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:
Creates a home directory for the Web site within the /www/vhosts/ directory,
and also creates an htdocs and logs directory for it. A cgi bin directory is also
created, if you chose to add a separate cgi bin for the virtual host.
Adds a Virtual Host entry to your /www/conf/vhosts.conf file. The lines
contained in this entry, which are enclosed within
VirtualHost> tags, are what actually allow the virtual host to function. A typical
Virtual Host entry looks like the following:
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
Technical Training Department
August 2004
6 15