AlpineWeb Design Home
Check Domain Name Availability
Customer Login | Help Desk | Contact Us
    Hosting > VPS > Linux VPS > Getting Started Guide >

Linux VPS Getting Started Guide: Configuring Subhosts

Linux VPS enables you to configure multiple Web sites and domains in addition to the main domain of the server. The main domain or site for the server is called the hostname. Place the content for this site in the /var/www/html directory.

You may have configured a custom hostname during the order process. To aid with configuring and testing your account, all Linux VPS receive a temporary domain name, or temp domain, which resolves to your Linux VPS account. This domain can be used if the hostname is inaccessible or does not yet point to your account.

Other domains or sites hosted by your account are called subhosts. This section explains adding, removing, and configuring subhosts.

To execute the vaddhost command or edit the httpd.conf file, you must be the root user. You can become the root user by typing su at the command line and supplying the root user password.

Adding a Subhost

Subhosts are configured with the Apache Virtual Host directive. The Apache Web server looks for Virtual Host entries in the /www/conf/httpd.conf file. The vaddhost custom installation script assists in the creation of the subhost configuration Virtual Host tags in your Apache configuration file.

Subhost configuration includes many variables. While separated here into three sections, the entire process includes all three and you must complete all of them to entirely configure the subhost.

To begin the subhost configuration and specify the domain and administrator, follow these steps from the command line:
  1. Type vaddhost and press Enter. Instructions and information for vaddhost will display during this step and throughout the vaddhost process.
  2. Type the domain for the subhost (domain.com, for example), any other variations of the domain (www.domain.com, store.domain.com, etc), and any other domains used for this subhost, pressing Enter after each. The first domain entered will be the main domain for the subhost. Additional variations will be aliases that point to the main domain. Press Enter without any text after providing all variations to move to the next step.
    Note: The hostname or subhost usually consists of the top-level domain only (domain.com) instead of a canonical name such as www.domain.com. Canonical names are usually added as secondary domains or aliases.
  3. The system displays the list of domains and variations for verification. Type y and press Enter to continue or type n and press Enter to input the domains again.
  4. Type the username of the user who will administer the subhost and press Enter. (Press Enter without any text to display a list of existing users.) This user should be the owner of the site files and folders, otherwise the Web server will not be able to load the site.
  5. Verify the information and type y and press Enter to continue or type n and press Enter to input the username again.
To continue the configuration and specify SSL, administrative email, and document root (Web directory) settings, follow these steps from the command line:
  1. To enable SSL for the subhost type y and press Enter or type n and press Enter to not enable SSL for the subhost.
  2. Verify the information and type y and press Enter to continue or type n and press Enter to input the SSL information again.
  3. Type the email address of the subhost administrator and press Enter.
  4. Verify the information and type y and press Enter to continue or type n and press Enter to input the address again.
  5. Type the path for the subhost Web directory, or document root, on the server. The vaddhost command simplifies this step and provides a recommended path for you. You can press Enter without typing a path to select this default, which will create a subhosted directory in the home directory of the user specified in step 4.
  6. Verify the information and type y and press Enter to continue or type n and press Enter to input the path again.
To continue the configuration and specify log and cgi-bin settings, follow these steps from the command line:
  1. Select an option for the subhost transfer log and press Enter.
  2. Verify the information and type y and press Enter to continue or type n and press Enter to choose the transfer log configuration again.
  3. Select an option for the subhost error log and press Enter.
  4. Verify the information and type y and press Enter to continue or type n and press Enter to choose the error log configuration again.
  5. Select an option for the subhost cgi-bin and press Enter. This will enable the subhost to execute scripts and programs.
  6. Verify the information and type y and press Enter to continue or type n and press Enter to choose the cgi-bin configuration again.
  7. The system will display the Virtual Host entry to be added to the httpd.conf file for confirmation. Type y and press Enter to add the entry to the httpd.conf file, or type n and press Enter to abort the vaddhost process.
  8. If you typed y to accept the entry, type y and press Enter to restart the Web server and complete the subhost addition.
Note: Press ctrl+c to exit the vaddhost process at any time. This immediately cancels vaddhost and any subhost configuration entered during the vaddhost process is lost.

Configuring a Subhost

You may configure a subhost further by editing the Virtual Host entries for the subhost in the /www/conf/httpd.conf file. Execute the restart_apache command from the command line after editing the file to restart the Web server and make the changes effective.

Removing a Subhost

The /www/conf/httpd.conf file contains the configuration for subhosts. To remove the subhost configuration from the Web server, follow these steps:
  1. Edit the httpd.conf file and remove the Virtual Host entries for the subhost in question.
  2. After modifying the httpd.conf file, execute the restart_apache command from the command line to restart the Web server.
  3. Remove any unneeded files or directories for the subhost from the server.
Note: Please refer to "Removing Users" on page 3 for further information about subhost files and directories assigned to a user and considerations when removing that user.


image


DocumentationDocumentation Home
Help Desk
Knowledgebase

Business Services
PC Data Backup Support
Sugar CRM



Web Hosting
Getting Started Guides
Basic Hosting
Starter Hosting
Signature Hosting
Virtual Private Servers
  • FreeBSD VPS v2/3
  • Linux VPS
Managed Private Servers
  • FreeBSD MPS v2/3
  • Linux MPS





image
Authorized viaVerio Reseller         Authorize.net         Miva Certified Business Partner
Homepage | About Us | Privacy Policy | Rates & Fees | Contact Us | Sitemap

All contents © Copyright 1997-2010 AlpineWeb Design