From de947e8e5a4e3ed80362926c7d8da8639eb08f8e Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Wed, 27 Mar 2013 17:51:58 +0000 Subject: [PATCH] add missing generated mod_macro files Pointed out by: Tom Evans git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1461742 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/mod_macro.html | 9 ++ docs/manual/mod/mod_macro.html.en | 239 +++++++++++++++++++++++++++++ docs/manual/mod/mod_macro.xml.meta | 13 ++ 3 files changed, 261 insertions(+) create mode 100644 docs/manual/mod/mod_macro.html create mode 100644 docs/manual/mod/mod_macro.html.en create mode 100644 docs/manual/mod/mod_macro.xml.meta diff --git a/docs/manual/mod/mod_macro.html b/docs/manual/mod/mod_macro.html new file mode 100644 index 0000000000..1b2896af11 --- /dev/null +++ b/docs/manual/mod/mod_macro.html @@ -0,0 +1,9 @@ +# GENERATED FROM XML -- DO NOT EDIT + +URI: mod_macro.html.en +Content-Language: en +Content-type: text/html; charset=ISO-8859-1 + +URI: mod_macro.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_macro.html.en b/docs/manual/mod/mod_macro.html.en new file mode 100644 index 0000000000..050624632b --- /dev/null +++ b/docs/manual/mod/mod_macro.html.en @@ -0,0 +1,239 @@ + + + +mod_macro - Apache HTTP Server + + + + + + + + +
<-
+
+Apache > HTTP Server > Documentation > Version 2.4 > Modules
+
+

Apache Module mod_macro

+
+

Available Languages:  en  | + fr 

+
+ + + +
Description:This module provides usage of macros within apache runtime configuration files
Status:Base
Module Identifier:macro_module
Source File:mod_macro.c
+

Summary

+ + +

This modules provides macros within apache runtime configuration files. + These macros have parameters. They are expanded when used (parameters are + substituted by their values given as an argument), and the result is + processed normally.

+
+

Directives

+ +

Topics

+
+
top
+
+

Features

+ + Definition of a macro: +
    +
  • macro definition within a <Macro> section, following + the apache style.
  • +
  • user defined names for the macro and its parameters.
  • +
  • macro names are case-insensitive, like apache directives.
  • +
  • macro parameter names are case sensitive.
  • +
  • macro parameters must have distinct names.
  • +
  • error on empty parameter names.
  • +
  • redefining a macro generates a warning.
  • +
  • macro definitions can be nested... (but what for?)
  • +
  • warn about unused macro parameters.
  • +
  • warn about macro parameter names which prefix one another.
  • +
  • warn if a parameter is not prefixed by any of '$%@' + (good practice).
  • +
  • the available prefixes help deal with interactions with other + directives such as Define.
  • +
  • tip: it may be useful to define a macro parameter with surrounding + braces, say ${foo} so that the name can appear with + surrounding characters such as bla${foo}bla.
  • +
  • warn about empty macro contents.
  • +
  • warns if sections are not properly nested within a macro. + (if it is detected so).
  • +
  • the lexical scope of macro parameters is restricted to the macro text, + it is not forwarded to includes for instance.
  • +
  • arbitrary contents in macros. +

    It means you can put perl sections or whatever you like in a macro. + No assumption is made about the lexical structure (quotes, spaces or + whatever) within the macro contents but to expect a set of + backslash-continued independent lines.

  • +
+ + Use of a macro: +
    +
  • number of arguments must match the definition.
  • +
  • all occurences of macro parameters are substituted by their values.
  • +
  • in case of conflicts, the longest parameter name is chosen.
  • +
  • macro expansion recursion is detected and stopped (error).
  • +
  • warn about empty arguments when used.
  • +
  • on errors, try to describe precisely where the error occured.
  • +
  • $ and %-prefixed parameters are not + escaped.
  • +
  • @-prefixed parameters are escaped in quotes.
  • +
+ + Removal of a macro definition: +
    +
  • the macro must be already defined.
  • +
+ +
+<Macro DirGroup $dir $group>
+  <Directory $dir>
+    require group $group
+  </Directory>
+</Macro>
+
+Use DirGroup /www/apache/private private
+Use DirGroup /www/apache/server  admin
+
+UndefMacro DirGroup
+    
+ +
+
top
+

<Macro> Directive

+ + + + + + +
Description:Define a configuration file macro
Syntax: +<Macro name [par1 .. parN]> +... </Macro>
Context:server config, virtual host, directory
Status:Base
Module:mod_macro
+

The Macro directive controls the definition of + a macro within the server runtime configuration files. + The first argument is the name of the macro. + Other arguments are parameters to the macro. It is good practice to prefix + parameter names with any of '$%@', and not macro names + with such characters. +

+ +
+<Macro LocalAccessPolicy>
+  order deny,allow
+  deny from all
+  allow from 10.2.16.0/24
+</Macro>
+
+<Macro RestrictedAccessPolicy $ipnumbers>
+   order deny,allow
+   deny from all
+   allow from $ipnumbers
+</Macro>
+    
+ + +
+
top
+

undefMacro Directive

+ + + + + + +
Description:Undefine a macro
Syntax:UndefMacro name
Context:server config, virtual host, directory
Status:Base
Module:mod_macro
+

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

+ +
+UndefMacro LocalAccessPolicy
+UndefMacro RestrictedAccessPolicy
+    
+ + +
+
top
+

Use Directive

+ + + + + + +
Description:Use a macro
Syntax:Use name [value1 ... valueN] +
Context:server config, virtual host, directory
Status:Base
Module:mod_macro
+

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 + associated to their corresponding initial parameters and are substituted + before processing.

+ +
+Use LocalAccessPolicy
+...
+Use RestrictedAccessPolicy "192.54.172.0/24 192.54.148.0/24"
+    
+ + + is equivalent, with the macros defined above, to: + +
+order deny,allow
+deny from all
+allow from 10.2.16.0/24
+...
+order deny,allow
+deny from all
+allow from 192.54.172.0/24 192.54.148.0/24
+    
+ + +
+
+
+

Available Languages:  en  | + fr 

+
top

Comments

Notice:
This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
+
+ \ No newline at end of file diff --git a/docs/manual/mod/mod_macro.xml.meta b/docs/manual/mod/mod_macro.xml.meta new file mode 100644 index 0000000000..2e26ebcdf4 --- /dev/null +++ b/docs/manual/mod/mod_macro.xml.meta @@ -0,0 +1,13 @@ + + + + + mod_macro + /mod/ + .. + + + en + fr + + -- 2.40.0