LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    
Virtual Host Templates
Virtual host template can be used to simplify the administration of virtual hosts with similar configuration, especially, for mass hosting environment. Once a template is configured properly, only minimum configuration is required when adding a new virtual host.
Each template contains a template configuration file, a list of mapped listeners and a list of member virtual hosts.

The template configuration file contains all configuration entries for a virtual host, with some fields requiring special values. For example, Virtual Host Root must contain a special variable $VH_NAME in the path. In this way, each member virtual host will have its own root directory based on its name.

To add a template-based virtual host, administrator only needs to add a member to the template member list with a unique virtual host name and a qualified domain name of that virtual host. Lister-to-virtual host mapping will be added automatically for all listeners in the mapped listener list.

Later on, if you need to customize the configuration for a particular virtual host, just "instantiate" that member virtual host, a standalone virtual host configuration will be created automatically. Even when setting up a virtual host with different configuration, it is still convenient to use a template as a starting point, and then customize it after instantiation.
 
Table of Contents
General Name   Template File   Mapped Listeners   
Member Virtual Hosts Name   Domain   Aliases   Virtual Host Root   
 
NameGo to top
Description: A unique name for the template.
Template FileGo to top
Description: Specifies the path to the configuration file of this template.
Syntax: path
Mapped ListenersGo to top
Description: Specifies the names of all listeners that this template maps to. An implicit listener-to-virtual host mapping will be added for all member virtual hosts based on their domain name and aliases.
Syntax: comma-separated list
NameGo to top
Description: A unique name for this virtual host among all template member virtual hosts and standalone virtual hosts. It can be referenced by variable $VH_NAME inside a directory path configuration.
If a standalone virtual host with the same name is also configured, then the member virtual host configuration will be ignored.
DomainGo to top
Description: Specifies a main domain name for this member virtual host. If left blank, virtual host name will be used. This should be a fully qualified domain name, but you can use IP address as well. It is recommended to append : for web site not on standard port 80. It can be referenced by variable $VH_DOMAIN for configuration contains domain names.
It will be used in the following situation:
  1. To match the host name in the "Host" header when processing a request.
  2. To populate domain name configurations for add-ons like frontpage or awstats.
Syntax: domain name
AliasesGo to top
Description: Specifies the alternate names for the virtual host. All possible hostname and IP address should be added to the list. Wildcard character * and ? are allowed in the name. It is recommended to append : for web site not on standard port 80.
It will be used in the following situations:
  1. To match the host name in the "Host" header when processing a request.
  2. To populate domain name/alias configurations configurations for add-ons like frontpage or awstats.
Syntax: comma-separated list of domain name
Virtual Host RootGo to top
Description: Specifies the root directory of this virtual host. Variable $VH_NAME must appear in the path. If left blank, the virtual host root path in the template configuration will be used instead.
Syntax: path



© Copyright 2003-2007 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.