HOME | SITEMAP | SUPPORT | FAQs
DOMAIN MANAGE/BACKROOM | BILLING
4Domains Web Hosting and Domain Registration
Account Login   WebMail   Live Chat

Web Hosting

Domain Names

Domain Auction

Solutions

Home > Vs2 > Basic > Admin > Web > Subhost > Conf

Executive and Corporate (E&C) Technical Support: Virtual Subhosting - Manually Adding Subhosts

Manually Configuring Virtual Subhosts

In order to manually configure a Virtual Subhost, connect to your E&C 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 E&C 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 SUBHOST-DOMAIN.NAME www.SUBHOST-DOMAIN.NAME:80>
        User           USERNAME
        Group          USERNAME
        ServerName     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 SUBHOST-DOMAIN.NAME www.SUBHOST-DOMAIN.NAME:443>
        SSLEnable
        User           USERNAME
        Group          USERNAME
        ServerName     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>
          

    You must substitute the Virtual Subhost domain name in place of SUBHOST-DOMAIN.NAME above. Also be sure that the first domain name you list in the <VirtualHost...> directive above matches the domain name you specify as the ServerName (again, to ensure compatibility with Microsoft FrontPage).

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


Why Us? | About | Contact Us
Knowledge Base | Support Request
Expired Domains | Domain Name Auctions | VPS Directory | DNS Tools
Hosting Terms | Domain Terms | Privacy Policy
Copyright © 2008 - 4Domains.com, Inc.


web hostinghostingdomaindomain namedomain namescheap web hostingecommerce website designdomain registration

Web Monitoring | SEO Technology | Hacker Scanner | DNS Tools | Online Backup