mod_info.xml revision f6822e2bcdc7990ac7f4c9224b7617fa2411d63b
675N/A<?xml version="1.0"?>
675N/A<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
675N/A<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
675N/A<!-- $LastChangedRevision$ -->
675N/A
675N/A<!--
675N/A Licensed to the Apache Software Foundation (ASF) under one or more
675N/A contributor license agreements. See the NOTICE file distributed with
675N/A this work for additional information regarding copyright ownership.
675N/A The ASF licenses this file to You under the Apache License, Version 2.0
675N/A (the "License"); you may not use this file except in compliance with
675N/A the License. You may obtain a copy of the License at
675N/A
675N/A http://www.apache.org/licenses/LICENSE-2.0
675N/A
675N/A Unless required by applicable law or agreed to in writing, software
675N/A distributed under the License is distributed on an "AS IS" BASIS,
675N/A WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
675N/A See the License for the specific language governing permissions and
675N/A limitations under the License.
675N/A-->
675N/A
675N/A<modulesynopsis metafile="mod_info.xml.meta">
675N/A
675N/A<name>mod_info</name>
675N/A<description>Provides a comprehensive overview of the server
675N/Aconfiguration</description>
675N/A<status>Extension</status>
675N/A<sourcefile>mod_info.c</sourcefile>
675N/A<identifier>info_module</identifier>
675N/A
675N/A<summary>
675N/A <p>To configure <module>mod_info</module>, add the following to your
675N/A <code>httpd.conf</code> file.</p>
675N/A
675N/A <highlight language="config">
675N/A&lt;Location /server-info&gt;
675N/A SetHandler server-info
675N/A&lt;/Location&gt;
675N/A </highlight>
675N/A
675N/A <p>You may wish to use <module>mod_authz_host</module> inside the
675N/A <directive type="section" module="core">Location</directive>
675N/A directive to limit access to your server configuration
675N/A information:</p>
675N/A
675N/A <highlight language="config">
675N/A&lt;Location /server-info&gt;
675N/A SetHandler server-info
675N/A Require host example.com
675N/A&lt;/Location&gt;
675N/A </highlight>
675N/A
675N/A <p>Once configured, the server information is obtained by
675N/A accessing <code>http://your.host.example.com/server-info</code></p>
675N/A</summary>
675N/A
675N/A<section id="security"><title>Security Issues</title>
675N/A <p>Once <module>mod_info</module> is loaded into the server, its
675N/A handler capability is available in <em>all</em> configuration
675N/A files, including per-directory files (<em>e.g.</em>,
675N/A <code>.htaccess</code>). This may have security-related
675N/A ramifications for your site.</p>
675N/A
675N/A <p>In particular, this module can leak sensitive information
675N/A from the configuration directives of other Apache modules such as
675N/A system paths, usernames/passwords, database names, etc. Therefore,
675N/A this module should <strong>only</strong> be
675N/A used in a controlled environment and always with caution.</p>
675N/A
675N/A <p>You will probably want to use <module>mod_authz_host</module>
675N/A to limit access to your server configuration information.</p>
675N/A
675N/A <example><title>Access control</title>
675N/A <highlight language="config">
675N/A&lt;Location /server-info&gt;
675N/A SetHandler server-info
675N/A Order allow,deny
675N/A # Allow access from server itself
675N/A Allow from 127.0.0.1
675N/A # Additionally, allow access from local workstation
675N/A Allow from 192.168.1.17
675N/A&lt;/Location&gt;
675N/A </highlight>
675N/A </example>
675N/A</section>
675N/A
675N/A<section id="queries"><title>Selecting the information shown</title>
675N/A <p>By default, the server information includes a list of
675N/A all enabled modules, and for each module, a description of
675N/A the directives understood by that module, the hooks implemented
675N/A by that module, and the relevant directives from the current
675N/A configuration.</p>
675N/A
675N/A <p>Other views of the configuration information are available by
675N/A appending a query to the <code>server-info</code> request. For
675N/A example, <code>http://your.host.example.com/server-info?config</code>
675N/A will show all configuration directives.</p>
675N/A
675N/A <dl>
675N/A <dt><code>?&lt;module-name&gt;</code></dt>
675N/A <dd>Only information relevant to the named module</dd>
675N/A <dt><code>?config</code></dt>
675N/A <dd>Just the configuration directives, not sorted by module</dd>
675N/A <dt><code>?hooks</code></dt>
675N/A <dd>Only the list of Hooks each module is attached to</dd>
675N/A <dt><code>?list</code></dt>
675N/A <dd>Only a simple list of enabled modules</dd>
675N/A <dt><code>?server</code></dt>
675N/A <dd>Only the basic server information</dd>
675N/A </dl>
675N/A</section>
675N/A
675N/A<section id="startup"><title>Dumping the configuration on startup</title>
675N/A <p>If the config define <code>-DDUMP_CONFIG</code> is set,
675N/A <module>mod_info</module> will dump the pre-parsed configuration to
675N/A <code>stdout</code> during server startup. Pre-parsed means that
675N/A directives like
675N/A <directive type="section" module="core">IfDefine</directive> and
675N/A <directive type="section" module="core">IfModule</directive> are
675N/A evaluated and environment varialbles are replaced. However it does
675N/A not represent the final state of the configuration. In particular,
675N/A it does not represent the merging or overriding that may happen
675N/A for repeated directives.</p>
675N/A
675N/A <p>This is roughly equivalent to the <code>?config</code> query.</p>
675N/A</section>
675N/A
675N/A<section id="limitations"><title>Known Limitations</title>
675N/A <p><module>mod_info</module> provides its information by reading the
675N/A parsed configuration, rather than reading the original configuration
675N/A file. There are a few limitations as a result of the way the parsed
675N/A configuration tree is created:</p>
675N/A <ul>
675N/A <li>Directives which are executed immediately rather than being
675N/A stored in the parsed configuration are not listed. These include
675N/A <directive module="core">ServerRoot</directive>,
675N/A <directive module="mod_so">LoadModule</directive>, and
675N/A <directive module="mod_so">LoadFile</directive>.</li>
675N/A <li>Directives which control the configuration file itself, such as
675N/A <directive module="core">Include</directive>,
675N/A <directive module="core">&lt;IfModule&gt;</directive> and
675N/A <directive module="core">&lt;IfDefine&gt;</directive> are not
675N/A listed, but the included configuration directives are.</li>
675N/A <li>Comments are not listed. (This may be considered a feature.)</li>
675N/A <li>Configuration directives from <code>.htaccess</code> files are
675N/A not listed (since they do not form part of the permanent server
675N/A configuration).</li>
675N/A <li>Container directives such as
675N/A <directive module="core">&lt;Directory&gt;</directive>
675N/A are listed normally, but <module>mod_info</module> cannot figure
675N/A out the line number for the closing
675N/A <directive module="core">&lt;/Directory&gt;</directive>.</li>
675N/A <li>Directives generated by third party modules such as <a href="http://perl.apache.org">mod_perl</a>
675N/A might not be listed.</li>
675N/A </ul>
675N/A</section>
675N/A
675N/A<directivesynopsis>
675N/A<name>AddModuleInfo</name>
675N/A<description>Adds additional information to the module
675N/Ainformation displayed by the server-info handler</description>
675N/A<syntax>AddModuleInfo <var>module-name</var> <var>string</var></syntax>
675N/A<contextlist><context>server config</context><context>virtual host</context>
675N/A</contextlist>
675N/A
675N/A<usage>
675N/A <p>This allows the content of <var>string</var> to be shown as
675N/A HTML interpreted, <strong>Additional Information</strong> for
675N/A the module <var>module-name</var>. Example:</p>
675N/A
675N/A <highlight language="config">
675N/AAddModuleInfo mod_deflate.c 'See &lt;a \
675N/A href="http://httpd.apache.org/docs/&httpd.docs;/mod/mod_deflate.html"&gt;\
675N/A http://httpd.apache.org/docs/&httpd.docs;/mod/mod_deflate.html&lt;/a&gt;'
675N/A </highlight>
675N/A</usage>
675N/A
675N/A</directivesynopsis>
675N/A</modulesynopsis>
675N/A