Apache Module mod_macro

Summary

Provides macros within Apache httpd runtime configuration files,
to ease the process of creating numerous similar configuration
blocks. When the server starts up, the macros are expanded using the
provided parameters, and the result is processed as along with the
rest of the configuration file.

Parameter names should begin with a sigil such as $,
%, or @, so that they are clearly
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
the same variables in different scopes, which can cause confusion.

Parameters prefixed with either $ or % are
not escaped. Parameters prefixes with @ are escaped in
quotes.

Avoid using a parameter which contains another parameter as a prefix,
(For example, $win and $winter) as this may
cause confusion at expression evaluation time. In the event of such
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:

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.

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

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.