From: Daniel Gruno Date: Fri, 27 Apr 2012 05:50:53 +0000 (+0000) Subject: Syntax updates for mod_v*.xml X-Git-Tag: 2.5.0-alpha~6988 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f80b693cbaa25bff734c78eb6da65bb9d7c3061;p=apache Syntax updates for mod_v*.xml git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1331230 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_version.xml b/docs/manual/mod/mod_version.xml index 3b6b41a3b1..6110dbe58b 100644 --- a/docs/manual/mod/mod_version.xml +++ b/docs/manual/mod/mod_version.xml @@ -37,17 +37,15 @@ regular expressions.

Examples - <IfVersion 2.1.0>
- - # current httpd version is exactly 2.1.0
-
- </IfVersion>
-
- <IfVersion >= 2.2>
- - # use really new features :-)
-
- </IfVersion> + +<IfVersion 2.4.2> + # current httpd version is exactly 2.4.2 +</IfVersion> + +<IfVersion >= 2.5> + # use really new features :-) +</IfVersion> +

See below for further possibilities.

@@ -89,12 +87,12 @@ Example - <IfVersion >= 2.1>
- - # this happens only in versions greater or
- # equal 2.1.0.
-
- </IfVersion> + +<IfVersion >= 2.3> + # this happens only in versions greater or + # equal 2.3.0. +</IfVersion> +

Besides the numerical comparison it is possible to match a @@ -112,23 +110,21 @@ Example - <IfVersion = /^2.1.[01234]$/>
- - # e.g. workaround for buggy versions - - </IfVersion> + +<IfVersion = /^2.4.[01234]$/> + # e.g. workaround for buggy versions +</IfVersion> +

In order to reverse the meaning, all operators can be preceded by an exclamation mark (!):

- - <IfVersion !~ ^2.1.[01234]$>
- - # not for those versions
-
- </IfVersion> -
+ +<IfVersion !~ ^2.4.[01234]$> + # not for those versions +</IfVersion> +

If the operator is omitted, it is assumed to be =.

diff --git a/docs/manual/mod/mod_vhost_alias.xml b/docs/manual/mod/mod_vhost_alias.xml index 4296b62a69..6c27b9685a 100644 --- a/docs/manual/mod/mod_vhost_alias.xml +++ b/docs/manual/mod/mod_vhost_alias.xml @@ -44,10 +44,10 @@ hosting /cgi-bin/script.pl to /usr/local/apache2/cgi-bin/script.pl in all cases:

- - ScriptAlias /cgi-bin/ /usr/local/apache2/cgi-bin/
- VirtualScriptAlias /never/found/%0/cgi-bin/ -
+ +ScriptAlias /cgi-bin/ /usr/local/apache2/cgi-bin/ +VirtualScriptAlias /never/found/%0/cgi-bin/ + @@ -126,10 +126,10 @@ hosting

For simple name-based virtual hosts you might use the following directives in your server configuration file:

- - UseCanonicalName Off
- VirtualDocumentRoot /usr/local/apache/vhosts/%0 -
+ +UseCanonicalName Off +VirtualDocumentRoot /usr/local/apache/vhosts/%0 +

A request for http://www.example.com/directory/file.html will be @@ -142,10 +142,10 @@ hosting vhosts directory. To do this you might use the following in your configuration file:

- - UseCanonicalName Off
- VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2 -
+ +UseCanonicalName Off +VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2 +

A request for http://www.domain.example.com/directory/file.html @@ -155,18 +155,18 @@ hosting

A more even spread of files can be achieved by hashing from the end of the name, for example:

- + VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.-1/%2.-2/%2.-3/%2 - +

The example request would come from /usr/local/apache/vhosts/example.com/n/i/a/domain/directory/file.html.

Alternatively you might use:

- + VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2.4+ - +

The example request would come from /usr/local/apache/vhosts/example.com/d/o/m/ain/directory/file.html.

@@ -174,11 +174,11 @@ hosting

For IP-based virtual hosting you might use the following in your configuration file:

- - UseCanonicalName DNS
- VirtualDocumentRootIP /usr/local/apache/vhosts/%1/%2/%3/%4/docs
- VirtualScriptAliasIP /usr/local/apache/vhosts/%1/%2/%3/%4/cgi-bin -
+ +UseCanonicalName DNS +VirtualDocumentRootIP /usr/local/apache/vhosts/%1/%2/%3/%4/docs +VirtualScriptAliasIP /usr/local/apache/vhosts/%1/%2/%3/%4/cgi-bin +

A request for http://www.domain.example.com/directory/file.html @@ -195,9 +195,9 @@ hosting a % directive, you can work around the problem in the following way:

- + VirtualDocumentRoot /usr/local/apache/vhosts/%2.0.%3.0 - +

A request for http://www.domain.example.com/directory/file.html