mod_info.xml revision 3fe00a83fe4adecfe6235190a36c200841bc4cc1
23171986812b568beef50b28bdca284ab949e774rbowen<?xml version="1.0"?>
c3fcea07965f59723831e23da647a77518285b8eslive<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
e942c741056732f50da2074b36fe59805d370650slive<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
3fe00a83fe4adecfe6235190a36c200841bc4cc1yoshiki<!-- $Revision: 1.19 $ -->
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<!--
6fbd2e53c97ea6976d93e0ac521adabc55e0fb73nd Copyright 2002-2004 The Apache Software Foundation
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd Licensed under the Apache License, Version 2.0 (the "License");
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd you may not use this file except in compliance with the License.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd You may obtain a copy of the License at
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd http://www.apache.org/licenses/LICENSE-2.0
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd Unless required by applicable law or agreed to in writing, software
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd distributed under the License is distributed on an "AS IS" BASIS,
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd See the License for the specific language governing permissions and
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd limitations under the License.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd-->
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
7db9f691a00ead175b03335457ca296a33ddf31bnd<modulesynopsis metafile="mod_info.xml.meta">
23171986812b568beef50b28bdca284ab949e774rbowen
23171986812b568beef50b28bdca284ab949e774rbowen<name>mod_info</name>
c3fcea07965f59723831e23da647a77518285b8eslive<description>Provides a comprehensive overview of the server
c3fcea07965f59723831e23da647a77518285b8esliveconfiguration</description>
23171986812b568beef50b28bdca284ab949e774rbowen<status>Extension</status>
23171986812b568beef50b28bdca284ab949e774rbowen<sourcefile>mod_info.c</sourcefile>
c3fcea07965f59723831e23da647a77518285b8eslive<identifier>info_module</identifier>
23171986812b568beef50b28bdca284ab949e774rbowen
23171986812b568beef50b28bdca284ab949e774rbowen<summary>
c3fcea07965f59723831e23da647a77518285b8eslive <p>To configure <module>mod_info</module>, add the following to your
23171986812b568beef50b28bdca284ab949e774rbowen <code>httpd.conf</code> file.</p>
23171986812b568beef50b28bdca284ab949e774rbowen
72efd3996108e6e17834609af9cf84b95e4c586end <example>
72efd3996108e6e17834609af9cf84b95e4c586end &lt;Location /server-info&gt;<br />
72efd3996108e6e17834609af9cf84b95e4c586end <indent>
72efd3996108e6e17834609af9cf84b95e4c586end SetHandler server-info<br />
72efd3996108e6e17834609af9cf84b95e4c586end </indent>
72efd3996108e6e17834609af9cf84b95e4c586end &lt;/Location&gt;
72efd3996108e6e17834609af9cf84b95e4c586end </example>
23171986812b568beef50b28bdca284ab949e774rbowen
23171986812b568beef50b28bdca284ab949e774rbowen <p>Once configured, the server information is obtained by
14ae27a0c6c67bed36e2e8cb5099a02e19548943pquerna accessing <code>http://your.host.example.com/server-info</code></p>
23171986812b568beef50b28bdca284ab949e774rbowen</summary>
23171986812b568beef50b28bdca284ab949e774rbowen
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna<section id="security"><title>Security Issues</title>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <p>Once <module>mod_info</module> is loaded into the server, its
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna handler capability is available in <em>all</em> configuration
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna files, including per-directory files (<em>e.g.</em>,
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <code>.htaccess</code>). This may have security-related
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna ramifications for your site.</p>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <p>In particular, this module can leak sensitive information
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna from the configuration directives of other Apache modules such as
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna system paths, usernames/passwords, database names, etc. Therefore,
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna this module should <strong>only</strong> be
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna used in a controlled environment and always with caution.</p>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna
3fe00a83fe4adecfe6235190a36c200841bc4cc1yoshiki <p>You will probably want to use <module>mod_authz_host</module>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna to limit access to your server configuration information.</p>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <example><title>Access control</title>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna &lt;Location /server-info&gt;<br />
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <indent>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna SetHandler server-info<br />
14ae27a0c6c67bed36e2e8cb5099a02e19548943pquerna Order allow,deny<br />
14ae27a0c6c67bed36e2e8cb5099a02e19548943pquerna # Allow access from server itself<br />
14ae27a0c6c67bed36e2e8cb5099a02e19548943pquerna Allow from 127.0.0.1<br />
14ae27a0c6c67bed36e2e8cb5099a02e19548943pquerna # Additionally, allow access from local workstation<br />
14ae27a0c6c67bed36e2e8cb5099a02e19548943pquerna Allow from 192.168.1.17<br />
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna </indent>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna &lt;/Location&gt;
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna </example>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna</section>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna<section id="queries"><title>Selecting the information shown</title>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <p>By default, the server information includes a list of
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna all enabled modules, and for each module, a description of
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna the directives understood by that module, the hooks implemented
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna by that module, and the relevant directives from the current
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna configuration.</p>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <p>Other views of the configuration information are available by
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna appending a query to the <code>server-info</code> request. For
14ae27a0c6c67bed36e2e8cb5099a02e19548943pquerna example, <code>http://your.host.example.com/server-info?config</code>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna will show all configuration directives.</p>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <dl>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <dt><code>?&lt;module-name&gt;</code></dt>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <dd>Only information relevant to the named module</dd>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <dt><code>?config</code></dt>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <dd>Just the configuration directives, not sorted by module</dd>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <dt><code>?list</code></dt>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <dd>Only a simple list of enabled modules</dd>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <dt><code>?server</code></dt>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <dd>Only the basic server information</dd>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna </dl>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna</section>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna<section id="limitations"><title>Known Limitations</title>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <p><module>mod_info</module> provides its information by reading the
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna parsed configuration, rather than reading the original configuration
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna file. There are a few limitations as a result of the way the parsed
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna configuration tree is created:</p>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <ul>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <li>Directives which are executed immediately rather than being
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna stored in the parsed configuration are not listed. These include
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <directive module="core">ServerRoot</directive>,
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <directive module="mod_so">LoadModule</directive>, and
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <directive module="mod_so">LoadFile</directive>.</li>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <li>Directives which control the configuration file itself, such as
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <directive module="core">Include</directive>,
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <directive module="core">&lt;IfModule&gt;</directive> and
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <directive module="core">&lt;IfDefine&gt;</directive> are not
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna listed, but the included configuration directives are.</li>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <li>Comments are not listed. (This may be considered a feature.)</li>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <li>Configuration directives from <code>.htaccess</code> files are
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna not listed (since they do not form part of the permanent server
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna configuration).</li>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <li>Container directives such as
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <directive module="core">&lt;Directory&gt;</directive>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna are listed normally, but <module>mod_info</module> cannot figure
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna out the line number for the closing
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <directive module="core">&lt;/Directory&gt;</directive>.</li>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <li>Directives generated by third party modules such as <module>mod_perl</module>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna might not be listed.</li>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna </ul>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna</section>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna
23171986812b568beef50b28bdca284ab949e774rbowen<directivesynopsis>
23171986812b568beef50b28bdca284ab949e774rbowen<name>AddModuleInfo</name>
15ba1801088da1aad6d20609cf3f7b0b1eefce8aslive<description>Adds additional information to the module
23171986812b568beef50b28bdca284ab949e774rboweninformation displayed by the server-info handler</description>
72efd3996108e6e17834609af9cf84b95e4c586end<syntax>AddModuleInfo <var>module-name</var> <var>string</var></syntax>
72efd3996108e6e17834609af9cf84b95e4c586end<contextlist><context>server config</context><context>virtual host</context>
72efd3996108e6e17834609af9cf84b95e4c586end</contextlist>
23171986812b568beef50b28bdca284ab949e774rbowen<compatibility>Apache 1.3 and above</compatibility>
23171986812b568beef50b28bdca284ab949e774rbowen
23171986812b568beef50b28bdca284ab949e774rbowen<usage>
72efd3996108e6e17834609af9cf84b95e4c586end <p>This allows the content of <var>string</var> to be shown as
23171986812b568beef50b28bdca284ab949e774rbowen HTML interpreted, <strong>Additional Information</strong> for
72efd3996108e6e17834609af9cf84b95e4c586end the module <var>module-name</var>. Example:</p>
72efd3996108e6e17834609af9cf84b95e4c586end
72efd3996108e6e17834609af9cf84b95e4c586end <example>
b9b166bce28378f88ecba40c17f788f510b8357and AddModuleInfo mod_deflate.c 'See &lt;a \<br />
72efd3996108e6e17834609af9cf84b95e4c586end <indent>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna href="http://www.apache.org/docs-2.1/mod/mod_deflate.html"&gt;\<br />
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna http://www.apache.org/docs-2.1/mod/mod_deflate.html&lt;/a&gt;'
72efd3996108e6e17834609af9cf84b95e4c586end </indent>
72efd3996108e6e17834609af9cf84b95e4c586end </example>
23171986812b568beef50b28bdca284ab949e774rbowen</usage>
23171986812b568beef50b28bdca284ab949e774rbowen
23171986812b568beef50b28bdca284ab949e774rbowen</directivesynopsis>
23171986812b568beef50b28bdca284ab949e774rbowen</modulesynopsis>