[APACHE DOCUMENTATION]

Apache HTTP Server Version 1.3

Module mod_macro

This module is contained in the mod_macro.c file, and is not compiled in by default. It provides for using macros within apache runtime configuration files. These macros can be given arguments. They are expanded when used (arguments are substituted by their values), and the result is processed normally.

This documentation describes the 1.0.2 mod_macro version.

Features

Definition of a macro: Use of a macro:

Directives


<Macro> directive

Syntax:<Macro name args...>
Context: server config, virtual host, directory
Override:
Status: Extra
Module: mod_macro
Compatibility: Apache 1.3

This directive controls the definition of a macro within the server runtime configuration files. The first argument is the name of the macro. Others are arguments to the macro.

   <Macro LocalAccessPolicy>
   order deny,allow
   deny from all
   allow from 10.2.16.0/24
   </Macro>

   <Macro RestrictedAccessPolicy ipnumber>
   order deny,allow
   deny from all
   allow from ipnumber
   </Macro>

Use directive

Syntax: Use name args...
Context: server config, virtual host, directory
Override:
Status: Extra
Module: mod_macro
Compatibility: Apache 1.3

This 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 arguments are associated to the initial arguments and substituted before processing.

   Use LocalAccessPolicy
 
   ...

   Use RestrictedAccessPolicy "192.54.172.0/24 192.54.148.0/24"
is equivalent 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

Apache HTTP Server Version 1.3

Index Home