Virtual Private Server User Guide
The Apache Web Server
Warning! Because virtual hosts must point to your VPS server's IP
address before they will work properly, you should not configure a
virtual host on your server until its domain name is properly pointed
to your IP address through DNS. Doing so may cause unusual
effects with any or all of the virtual hosts already on your server.
Warning! Each Interland VPS server has a limit to the number of
virtual hosts that can be configured. The vaddvhost command will
not let you add a virtual host to your system if you have passed this
limit. Please note that although it is possible to manually add virtual
host declarations to your /www/conf/vhosts.conf file, exceeding the
maximum number of allowed virtual hosts for your product will
prevent the provided Apache Web server from starting.
Once your new virtual host is properly registered and added to our name servers,
you can configure the virtual host on your VPS server using the vaddvhost
command. The vaddvhost command creates a home for the virtual host in the /
www/vhosts directory, modifies /etc/mail/local host names to allow mail to be
received for the new domain, and makes modifications to your /www/conf/
vhosts.conf file in order to tell Apache about the new virtual host for which it
should provide service.
Example: To add a domain name as a virtual host of your VPS server, log on to
your VPS account and enter the following command at the shell prompt:
> vaddvhost
The following series of prompts appear (denoted by
even spaced type
). For
this example, we will add "acme.com" as a virtual host to your VPS server. For
each prompt that appears, enter the information denoted in bold type:
Enter the domain to add as a vhost:
acme.com
The above command line instructs vaddvhost to create a directory called
acme.com within your /www/vhosts directory. To help manage multiple hosts, it is
recommended that you include the .ext extension.
Would you like to alias www.acme.com to acme.com? [Y]:
The www alias ensures that people will be able to visit your site at either
acme.com or www.acme.com. Type Y or simply press ENTER to accept, or type N
to skip.
Would you like to alias any additional domains to acme.com? [N]:
You can add other aliases, or canonicals, to acme.com in the form
canonical.acme.com. Type N or simply press ENTER to skip, or Y to enter
additional aliases.
Would you like this vhost to have a cgi bin? [Y]:
Technical Training Department
August 2004
6 14