GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

VPS v2: Apache Web Server: Manually Configuring Virtual Subhosts

bullet Introduction

In order to manually configure a Virtual Subhost, connect to your Virtual Private Server via SSH, su to root, and do the following:

  1. 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.

  2. 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
  3. 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
        ServerAdmin    webmaster-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
        ServerAdmin    webmaster-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>

    You must substitute the VPS IP address in place of YOUR.IP.ADD.RESS above.

    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
  4. For more details about Virtual Subhosts and e-mail, see the following.


Toll Free 1-866-GSP-4400 • 1-301-464-9363 • service@gsp.com
Copyright © 1994-2016 GSP Services, Inc.