From 29bd6ba3386be3091d6339dae551576f93f0c932 Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Sun, 22 Jan 2012 23:26:31 +0000 Subject: [PATCH] Fix docs for Include, add docs for IncludeOptional git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1234643 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/core.xml | 71 +++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/docs/manual/mod/core.xml b/docs/manual/mod/core.xml index 6dbb8c7067..6ea0fa16c7 100644 --- a/docs/manual/mod/core.xml +++ b/docs/manual/mod/core.xml @@ -1990,7 +1990,7 @@ later. Include Includes other configuration files from within the server configuration files -Include [optional|strict] file-path|directory-path|wildcard +Include file-path|directory-path|wildcard server configvirtual host directory @@ -2012,27 +2012,14 @@ wildcard matching available in 2.3.6 and later wildcard syntax shown below, to include files that match a particular pattern, such as *.conf, for example.

-

When a wildcard is specified for a file component of - the path, and no file matches the wildcard, the - Include - directive will be silently ignored. When a wildcard is - specified for a directory component of the path, and - no directory matches the wildcard, the - Include directive will - fail with an error saying the directory cannot be found. -

- -

For further control over the behavior of the server when no files or - directories match, prefix the path with the modifiers optional - or strict. If optional is specified, any wildcard - file or directory that does not match will be silently ignored. If - strict is specified, any wildcard file or directory that does - not match at least one file will cause server startup to fail.

- -

When a directory or file component of the path is - specified exactly, and that directory or file does not exist, - Include directive will fail with an - error saying the file or directory cannot be found.

+

The Include directive will + fail with an error if a wildcard is specified for a + filename or directory component of the patch, but no file or directory + matches the wildcard. The same is true if a wildcard is specified for a + directory component of the path, and a mathing directory does not contain + the filename specified in the path. The + IncludeOptional directive can be + used instead, if non-matching wildcards should be ignored.

The file path specified may be an absolute path, or may be relative to the ServerRoot directory.

@@ -2053,31 +2040,47 @@ wildcard matching available in 2.3.6 and later

Wildcards may be included in the directory or file portion of the - path. In the following example, the server will fail to load if no - directories match conf/vhosts/*, but will load successfully if no - files match *.conf.

+ path. This example will fail if there is no subdirectory in conf/vhosts + or if a subdirectory of conf/vhosts does not contain at least one *.conf + file:

- Include conf/vhosts/*/vhost.conf
Include conf/vhosts/*/*.conf
-

In this example, the server will fail to load if either - conf/vhosts/* matches no directories, or if *.conf matches no files:

+

Alternatively, the following command will just be ignored in case of + missing files or directories:

- Include strict conf/vhosts/*/*.conf + IncludeOptional conf/vhosts/*/*.conf -

In this example, the server load successfully if either conf/vhosts/* - matches no directories, or if *.conf matches no files:

+ - - Include optional conf/vhosts/*/*.conf - +IncludeOptional +apachectl + + +IncludeOptional +Includes other configuration files from within +the server configuration files +IncludeOptional file-path|directory-path|wildcard +server configvirtual host +directory + +Available in 2.3.6 and later + + +

This directive allows inclusion of other configuration files + from within the server configuration files. It works identically to the + Include directive, with the + exception that if wildcards do not match any file or directory, the + IncludeOptional directive will be + silently ignored instead of causing an error.

+Include apachectl
-- 2.40.0