httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe JAILLET <christophe.jail...@wanadoo.fr>
Subject Re: Frédéric Trégon commented on http://httpd.apache.org/docs/2.4/mod/mod_macro.html
Date Sun, 03 Apr 2016 11:23:42 GMT
This is also reported as PR 58304
(https://bz.apache.org/bugzilla/show_bug.cgi?id=58304)

CJ

Le 02/04/2016 08:26, Marion & Christophe JAILLET a écrit :
> Hi,
>
> mod_macro states that:
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 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}>
>     DocumentRoot "/var/www/${docroot}/htdocs"
> </Macro>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> As written in the comment below, it works but it triggers a warning.
>
> When the directive is parsed, we first try to resolve env variable. 
> This is why we get the warning.
>
> In order to fix it we could just update the doc.
> For example, using [] instead of {} works fine.
> Or we could stipulate that if [} are used, then the in % prefix should 
> be used instead of $.
>
>
> Any opinion?
>
> CJ
>
>
>
> Le 31/03/2016 10:54, no-reply@comments.apache.org a écrit :
>> Hello,
>>      Frédéric Trégon has commented on 
>> http://httpd.apache.org/docs/2.4/mod/mod_macro.html.
>>      You can find the comment here:
>> http://httpd.apache.org/docs/2.4/mod/mod_macro.html#comment_5250
>>
>>      Below is the reply that was posted:
>>      ~~~~
>>      When using the tip about surrounding the parameter in braces:
>> ---
>> <Macro DocRoot ${docroot}>
>> ---
>>
>> You get a warning:
>> ---
>> AH00111: Config variable ${docroot} is not defined
>> ---
>>
>> The warning disappears if you remove the braces.
>>
>> So is it really the recommended way for defining parameters?
>>      ~~~~
>>
>


Mime
View raw message