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