From: Stefan Fritsch Date: Thu, 20 Jan 2011 19:17:38 +0000 (+0000) Subject: Update docs for changed Define syntax X-Git-Tag: 2.3.11~154 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2fb1e997b7be039a542f5cc13f06101da4647457;p=apache Update docs for changed Define syntax git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1061468 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/core.html.en b/docs/manual/mod/core.html.en index 0b80b3d4cf..070a363e90 100644 --- a/docs/manual/mod/core.html.en +++ b/docs/manual/mod/core.html.en @@ -593,15 +593,33 @@ which no other media type configuration could be found.
top

Define Directive

- - - + + +
Description:Define the existence of a variable
Syntax:Define parameter-name
Context:server config
Description:Define a variable
Syntax:Define parameter-name [parameter-value]
Context:server config, virtual host, directory
Status:Core
Module:core
-

Equivalent to passing the -D argument to httpd.

-

This directive can be used to toggle the use of <IfDefine> sections without needing to alter - -D arguments in any startup scripts.

+

In its one parameter form, Define is equivalent + to passing the -D argument to httpd. It + can be used to toggle the use of + <IfDefine> sections + without needing to alter -D arguments in any startup + scripts.

+ +

In addition to that, if the second parameter is given, a config variable + is set to this value. The variable can be used in the configuration using + the ${VAR} syntax. The variable is always globally defined + and not limited to the scope of the surrounding config section.

+ +

+ <IfDefine TEST>
+   Define servername test.example.com
+ </IfDefine>
+ <IfDefine !TEST>
+   Define servername www.example.com
+   Define SSL
+ </IfDefine>
+

top
diff --git a/docs/manual/mod/core.xml b/docs/manual/mod/core.xml index fa342067fc..eaa6e4bc0b 100644 --- a/docs/manual/mod/core.xml +++ b/docs/manual/mod/core.xml @@ -538,16 +538,33 @@ which no other media type configuration could be found. Define -Define the existence of a variable -Define parameter-name -server config +Define a variable +Define parameter-name [parameter-value] +server configvirtual host +directory -

Equivalent to passing the -D argument to httpd.

-

This directive can be used to toggle the use of IfDefine sections without needing to alter - -D arguments in any startup scripts.

+

In its one parameter form, Define is equivalent + to passing the -D argument to httpd. It + can be used to toggle the use of + IfDefine sections + without needing to alter -D arguments in any startup + scripts.

+ +

In addition to that, if the second parameter is given, a config variable + is set to this value. The variable can be used in the configuration using + the ${VAR} syntax. The variable is always globally defined + and not limited to the scope of the surrounding config section.

+ + + <IfDefine TEST>
+   Define servername test.example.com
+ </IfDefine>
+ <IfDefine !TEST>
+   Define servername www.example.com
+   Define SSL
+ </IfDefine>
+