h1

Mass Virtual Posting in Apache 2

February 25, 2010

The mod_vhost_alias module allows the document root and CGI script directories for all matching virtual hosts to be specified as templates, into which parts of the hostname or IP address are interpolated, as indicated by the specifiers listed below:

%p – Replaced with the port number of the virtual host.

%n – Replaced with the nth dot-separated component of the hostname or IP address. If n is zero, then the whole string is used. If n is preceded by a minus sign, then it counts from the end of the hostname or IP address. If the specifier is suffixed by a plus sign, then the rest of the hostname or IP address is used.

%n.m – Replaced with the nth character of what would be selected by %n.

%% – Replaced with a single percent (%) sign.

Virtual Document Root

mod_vhost_alias (E)

VirtualDocumentRoot directory-template

URLs for a matching virtual host are translated to file names by prepending a document root directory formed by interpolating the value of the server name into directory-template.

VirtualDocumentRootIP

mod_vhost_alias (E)

VirtualDocumentRootIP directory-template

Identical to VirtualDocumentRoot, except the IP address is used rather than the server name.

VirtualScriptAlias

mod_vhost_alias (E)

VirtualScriptAlias directory-template

URLs for a matching virtual host that start with /cgi-bin/ are translated to filenames by prepending a script directory formed by interpolating the value of the server name into directory-template. The handler is marked as cgi-script so that the file will be processed as such.

VirtualScriptAliasIP

mod_vhost_alias (E)

VirtualScriptAliasIP directory-template

Identical to VirtualScriptAlias, except the IP is used rather than the server name.

Advertisements
%d bloggers like this: