Skip to content

Commit 8425acc

Browse files
committed
Adds caution about overusing IfModule, and mentions the -M flag in
addition to the -l flag for determining what modules are loaded. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1003217 13f79535-47bb-0310-9956-ffa450edef68
1 parent 1d83e41 commit 8425acc

2 files changed

Lines changed: 20 additions & 10 deletions

File tree

docs/manual/configuring.html.en

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Server.</p>
4949
added using the <code class="directive"><a href="./mod/core.html#include">Include</a></code>
5050
directive, and wildcards can be used to include many configuration
5151
files. Any directive may be placed in any of these configuration
52-
files. Changes to the main configuration files are only
52+
files. Changes to the main configuration files are only
5353
recognized by httpd when it is started or restarted.</p>
5454

5555
<p>The server also reads a file containing mime document types;
@@ -79,13 +79,13 @@ Server.</p>
7979
If "ENVVAR" is the name of a valid environment variable, the value
8080
of that variable is substituted into that spot in the
8181
configuration file line, and processing continues as if that text
82-
were found directly in the configuration file. (If the ENVVAR
82+
were found directly in the configuration file. (If the ENVVAR
8383
variable is not found, the characters "${ENVVAR}" are left
8484
unchanged for use by later stages in the config file
8585
processing.)</p>
8686

8787
<p>Only environment variables defined before the server is started
88-
can be used in expansions. Variables defined in the
88+
can be used in expansions. Variables defined in the
8989
configuration file itself, for example with <code class="directive"><a href="./mod/mod_env.html#setenv">SetEnv</a></code>, take effect too late to be
9090
used for expansions in the configuration file.</p>
9191

@@ -115,10 +115,15 @@ Server.</p>
115115
directive.
116116
Otherwise, httpd must be recompiled to add or remove modules.
117117
Configuration directives may be included conditional on a
118-
presence of a particular module by enclosing them in an <code class="directive"><a href="./mod/core.html#ifmodule">&lt;IfModule&gt;</a></code> block.</p>
118+
presence of a particular module by enclosing them in an <code class="directive"><a href="./mod/core.html#ifmodule">&lt;IfModule&gt;</a></code> block. However,
119+
<code class="directive">&lt;IfModule&gt;</code> blocks are not
120+
required, and in some cases may mask the fact that you're missing an
121+
important module.</p>
119122

120123
<p>To see which modules are currently compiled into the server,
121-
you can use the <code>-l</code> command line option.</p>
124+
you can use the <code>-l</code> command line option. You can also
125+
see what modules are loaded dynamically using the <code>-M</code>
126+
command line option.</p>
122127
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
123128
<div class="section">
124129
<h2><a name="scope" id="scope">Scope of Directives</a></h2>

docs/manual/configuring.xml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Server.</p>
5151
added using the <directive module="core">Include</directive>
5252
directive, and wildcards can be used to include many configuration
5353
files. Any directive may be placed in any of these configuration
54-
files. Changes to the main configuration files are only
54+
files. Changes to the main configuration files are only
5555
recognized by httpd when it is started or restarted.</p>
5656

5757
<p>The server also reads a file containing mime document types;
@@ -82,13 +82,13 @@ Server.</p>
8282
If "ENVVAR" is the name of a valid environment variable, the value
8383
of that variable is substituted into that spot in the
8484
configuration file line, and processing continues as if that text
85-
were found directly in the configuration file. (If the ENVVAR
85+
were found directly in the configuration file. (If the ENVVAR
8686
variable is not found, the characters "${ENVVAR}" are left
8787
unchanged for use by later stages in the config file
8888
processing.)</p>
8989

9090
<p>Only environment variables defined before the server is started
91-
can be used in expansions. Variables defined in the
91+
can be used in expansions. Variables defined in the
9292
configuration file itself, for example with <directive
9393
module="mod_env">SetEnv</directive>, take effect too late to be
9494
used for expansions in the configuration file.</p>
@@ -130,10 +130,15 @@ Server.</p>
130130
Otherwise, httpd must be recompiled to add or remove modules.
131131
Configuration directives may be included conditional on a
132132
presence of a particular module by enclosing them in an <directive
133-
module="core" type="section">IfModule</directive> block.</p>
133+
module="core" type="section">IfModule</directive> block. However,
134+
<directive type="section">IfModule</directive> blocks are not
135+
required, and in some cases may mask the fact that you're missing an
136+
important module.</p>
134137

135138
<p>To see which modules are currently compiled into the server,
136-
you can use the <code>-l</code> command line option.</p>
139+
you can use the <code>-l</code> command line option. You can also
140+
see what modules are loaded dynamically using the <code>-M</code>
141+
command line option.</p>
137142
</section>
138143

139144
<section id="scope">

0 commit comments

Comments
 (0)