Bug 66153 - mod_macro documentation: examples use ${...} syntax for macro arguments, conflicting with Define ${...} syntax
Summary: mod_macro documentation: examples use ${...} syntax for macro arguments, conf...
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Documentation (show other bugs)
Version: 2.4-HEAD
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: HTTP Server Documentation List
URL: https://httpd.apache.org/docs/2.4/mod...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-30 16:02 UTC by Darren Embry
Modified: 2022-06-30 16:09 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darren Embry 2022-06-30 16:02:49 UTC
The documentation for mod_macro under Tips:

    https://httpd.apache.org/docs/2.4/mod/mod_macro.html#tips

provides an example using the ${...} syntax for macro arguments.  Attemping to use
this in an actual Apache configuration:

    <Macro VHost ${domain} ${suffix} ${dir}>
        <VirtualHost *:80>
            ServerName  www.${domain}.${suffix}
            ServerAlias ${domain}.${suffix}
            # ...
            ErrorLog ${APACHE_LOG_DIR}/${domain}.${suffix}-error.log
            CustomLog ${APACHE_LOG_DIR}/${domain}.${suffix}-access.log combined
        </VirtualHost>
        # ...
    </Macro>

results in a few occurrences of the following warning:

    [macro:warn] [pid 29527] AH02805: macro 'vhost' (defined on line 5 of "/etc/apache2/sites-enabled/100-macro-sites.conf") argument name '${domain}' (#1) clashes with 'Define' syntax '${...}', better use '$(...)'.

Fixing all occurrences of ${...} to use the $(...) syntax, **except** for things like ${APACHE_LOG_DIR}, silences the warning.

Documentation should be modified to use the $(...) syntax instead of ${...} syntax for macro arguments, including in the <Macro> line.
Comment 1 Darren Embry 2022-06-30 16:09:59 UTC
This relates to bug 59299 and bug 58304, both of which I've marked RESOLVED/FIXED.