From 2a463b3cd73c32ee9dcd508248d0194923f435f4 Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Sat, 29 Mar 2014 21:56:19 +0100 Subject: Imported Upstream version 2.4.9 --- docs/manual/mod/mod_macro.html.en | 62 ++++++++++++++------------------------- 1 file changed, 22 insertions(+), 40 deletions(-) (limited to 'docs/manual/mod/mod_macro.html.en') diff --git a/docs/manual/mod/mod_macro.html.en b/docs/manual/mod/mod_macro.html.en index 5a4cd92e..cab91739 100644 --- a/docs/manual/mod/mod_macro.html.en +++ b/docs/manual/mod/mod_macro.html.en @@ -9,7 +9,7 @@ - @@ -64,8 +64,7 @@ for those parts that will need to be substituted.

For example, you might use a macro to define a <VirtualHost> block, in order to define multiple similar virtual hosts:

-
-<Macro VHost $name $domain>
+
<Macro VHost $name $domain>
 <VirtualHost *:80>
     ServerName $domain
     ServerAlias www.$domain
@@ -74,8 +73,7 @@ multiple similar virtual hosts:

ErrorLog /var/log/httpd/$name.error_log CustomLog /var/log/httpd/$name.access_log combined </VirtualHost> -</Macro> -
+</Macro>

Macro names are case-insensitive, like httpd configuration @@ -84,13 +82,11 @@ directives. However, variable names are case sensitive.

You would then invoke this macro several times to create virtual hosts:

-
-Use VHost example example.com
+
Use VHost example example.com
 Use VHost myhost hostname.org
 Use VHost apache apache.org
 
-UndefMacro VHost
-
+UndefMacro VHost

At server startup time, each of these Use @@ -110,7 +106,7 @@ Examples section.

Parameter names should begin with a sigil such as $, %, or @, so that they are clearly -identifiable, and also in order to help deail with interactions with +identifiable, and also in order to help deal with interactions with other directives, such as the core Define directive. Failure to do so will result in a warning. Nevertheless, you are encouraged to have a good knowledge of your entire server configuration in order to avoid reusing @@ -128,11 +124,9 @@ confusion, the longest possible parameter name is used.

If you want to use a value within another string, it is useful to surround the parameter in braces, to avoid confusion:

-
-<Macro DocRoot ${docroot}>
+
<Macro DocRoot ${docroot}>
     DocumentRoot /var/www/${docroot}/htdocs
-</Macro>
-
+</Macro>
top
@@ -146,8 +140,7 @@ surround the parameter in braces, to avoid confusion:

A common usage of mod_macro is for the creation of dynamically-generated virtual hosts.

-
-## Define a VHost Macro for repetitive configurations
+
## Define a VHost Macro for repetitive configurations
 
 <Macro VHost $host $port $dir>
   Listen $port
@@ -172,8 +165,7 @@ dynamically-generated virtual hosts.

Use VHost www.apache.org 80 /vhosts/apache/htdocs Use VHost example.org 8080 /vhosts/example/htdocs -Use VHost www.example.fr 1234 /vhosts/example.fr/htdocs -
+Use VHost www.example.fr 1234 /vhosts/example.fr/htdocs
@@ -184,8 +176,7 @@ Use VHost www.example.fr 1234 /vhosts/example.fr/htdocs avoids confusion in a complex configuration file where there may be conflicts in variable names.

-
-<Macro DirGroup $dir $group>
+
<Macro DirGroup $dir $group>
   <Directory $dir>
     Require group $group
   </Directory>
@@ -194,8 +185,7 @@ conflicts in variable names.

Use DirGroup /www/apache/private private Use DirGroup /www/apache/server admin -UndefMacro DirGroup -
+UndefMacro DirGroup
@@ -220,15 +210,13 @@ UndefMacro DirGroup with such characters.

-
-<Macro LocalAccessPolicy>
+    
<Macro LocalAccessPolicy>
     Require ip 10.2.16.0/24
 </Macro>
 
 <Macro RestrictedAccessPolicy $ipnumbers>
     Require ip $ipnumbers
-</Macro>
-    
+</Macro>
@@ -244,10 +232,8 @@ UndefMacro DirGroup

The UndefMacro directive undefines a macro which has been defined before hand.

-
-UndefMacro LocalAccessPolicy
-UndefMacro RestrictedAccessPolicy
-    
+
UndefMacro LocalAccessPolicy
+UndefMacro RestrictedAccessPolicy
@@ -263,24 +249,20 @@ UndefMacro RestrictedAccessPolicy

The Use directive controls the use of a macro. The specified macro is expanded. It must be given the same number of - arguments than in the macro definition. The provided values are + arguments as in the macro definition. The provided values are associated to their corresponding initial parameters and are substituted before processing.

-
-Use LocalAccessPolicy
+    
Use LocalAccessPolicy
 ...
-Use RestrictedAccessPolicy "192.54.172.0/24 192.54.148.0/24"
-    
+Use RestrictedAccessPolicy "192.54.172.0/24 192.54.148.0/24"

is equivalent, with the macros defined above, to:

-
-Require ip 10.2.16.0/24
+    
Require ip 10.2.16.0/24
 ...
-Require ip 192.54.172.0/24 192.54.148.0/24
-    
+Require ip 192.54.172.0/24 192.54.148.0/24
@@ -306,7 +288,7 @@ var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/mod_macro.html'; } })(window, document); //-->