In order to manually configure a Virtual Subhost, connect to your Virtual Private Server via SSH, su to root, and do the following:
- Run either vadduser to create the primary user's account, or run vedituser to grant the user web and FTP permissions. This will create a www directory under their username. The www directory will contain both a cgi-bin directory and a logs directory.
- For each Virtual Subhost you configure on your Virtual Private Server you will need to create
a new directory for the Virtual Subhost domain files in the specified User's www directory.
# mkdir -p ~/home/USERNAME/www/SUBHOST-DOMAIN.NAME
Then change the ownership of the new directories:
# chown -R USERNAME:www /home/USERNAME/www - Open up your web server configuration file (/www/conf/httpd.conf)
and add the following lines in the <VirtualHost> section of the file to ensure
compatibility with Microsoft FrontPage. The <VirtualHost> section is found at
the bottom of the file.
<VirtualHost YOUR.IP.ADD.RESS:80> User USERNAME Group USERNAME ServerName SUBHOST-DOMAIN.NAME ServerAlias WWW.SUBHOST-DOMAIN.NAME ServerAdmin webmaster@SUBHOST-DOMAIN.NAME DocumentRoot /home/USERNAME/www/SUBHOST-DOMAIN.NAME ScriptAlias /cgi-bin/ "/home/USERNAME/www/cgi-bin/" <Directory /home/USERNAME/www/cgi-bin> AllowOverride None Options ExecCGI Order allow,deny Allow from all </Directory> CustomLog /home/USERNAME/www/logs/access_log combined ErrorLog /home/USERNAME/www/logs/error_log </VirtualHost>NOTE: If you want this Virtual Host SSL enabled, you will need to add the following entry as well:
<VirtualHost YOUR.IP.ADD.RESS:443> SSLEnable User USERNAME Group USERNAME ServerName SUBHOST-DOMAIN.NAME ServerAlias WWW.SUBHOST-DOMAIN.NAME ServerAdmin webmaster@SUBHOST-DOMAIN.NAME DocumentRoot /home/USERNAME/www/SUBHOST-DOMAIN.NAME ScriptAlias /cgi-bin/ "/home/USERNAME/www/cgi-bin/" <Directory /home/USERNAME/www/cgi-bin> AllowOverride None Options ExecCGI Order allow,deny Allow from all </Directory> CustomLog /home/USERNAME/www/logs/access_log combined ErrorLog /home/USERNAME/www/logs/error_log </VirtualHost>Substitute the VPS IP address in place of YOUR.IP.ADD.RESS above.
You must substitute the Virtual Subhost domain name in place of SUBHOST-DOMAIN.NAME above. - For more details about Virtual Subhosts and e-mail, see the following.
- The Virtusertable - Providing E-Mail for Virtual Subhosts
|
NOTE: If the specified User will be responsible for more than one Virtual Host, you may want to create separate virtual host logs, rather than combined logs. CustomLog /home/USERNAME/www/logs/SUBHOST-DOMAIN.NAME-access_log combined ErrorLog /home/USERNAME/www/logs/SUBHOST-DOMAIN.NAME-error_log |
Please note: the information on this page applies to ITS web hosting plans. It may or may not apply to other environments. If you are looking for a feature described here, or better support from your hosting provider, please consider hosting your site with ITS!
Copyright © 1996-2008, Integrated Technical Solutions, Inc., all rights reserved. See Terms/Legal for trademarks, copyright, and terms of use.
Naperville, IL 60563
fax 630.420.2771
