mod_info.xml revision a6fc6b44b7f8ad7390864b3555341d3abf867f7e
c3fcea07965f59723831e23da647a77518285b8eslive<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
e942c741056732f50da2074b36fe59805d370650slive<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
5f5d1b4cc970b7f06ff8ef6526128e9a27303d88nd<!-- $LastChangedRevision$ -->
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding Licensed to the Apache Software Foundation (ASF) under one or more
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding contributor license agreements. See the NOTICE file distributed with
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding this work for additional information regarding copyright ownership.
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding The ASF licenses this file to You under the Apache License, Version 2.0
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding (the "License"); you may not use this file except in compliance with
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding the License. You may obtain a copy of the License at
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.
c3fcea07965f59723831e23da647a77518285b8eslive<description>Provides a comprehensive overview of the server
c3fcea07965f59723831e23da647a77518285b8esliveconfiguration</description>
c3fcea07965f59723831e23da647a77518285b8eslive <p>To configure <module>mod_info</module>, add the following to your
4c05a0bde64b79d08f4a8791e5919151ff353849humbedooh<Location /server-info>
4c05a0bde64b79d08f4a8791e5919151ff353849humbedooh SetHandler server-info
4c05a0bde64b79d08f4a8791e5919151ff353849humbedooh</Location>
4c05a0bde64b79d08f4a8791e5919151ff353849humbedooh </highlight>
f6822e2bcdc7990ac7f4c9224b7617fa2411d63bcovener <p>You may wish to use <module>mod_authz_host</module> inside the
251d54de2284abc4a59d0959487e1ddcb8714b4arbowen <directive type="section" module="core">Location</directive>
4f3a5dcf5f9538e0e51183011e346c16be8dc126rbowen directive to limit access to your server configuration
251d54de2284abc4a59d0959487e1ddcb8714b4arbowen information:</p>
4c05a0bde64b79d08f4a8791e5919151ff353849humbedooh<Location /server-info>
4c05a0bde64b79d08f4a8791e5919151ff353849humbedooh SetHandler server-info
4c05a0bde64b79d08f4a8791e5919151ff353849humbedooh</Location>
4c05a0bde64b79d08f4a8791e5919151ff353849humbedooh </highlight>
23171986812b568beef50b28bdca284ab949e774rbowen <p>Once configured, the server information is obtained by
14ae27a0c6c67bed36e2e8cb5099a02e19548943pquerna accessing <code>http://your.host.example.com/server-info</code></p>
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 <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 used in a controlled environment and always with caution.</p>
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim <p>You will probably want to use <module>mod_authz_host</module>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna to limit access to your server configuration information.</p>
4c05a0bde64b79d08f4a8791e5919151ff353849humbedooh<Location /server-info>
4c05a0bde64b79d08f4a8791e5919151ff353849humbedooh SetHandler server-info
4c05a0bde64b79d08f4a8791e5919151ff353849humbedooh Order allow,deny
4c05a0bde64b79d08f4a8791e5919151ff353849humbedooh # Allow access from server itself
4c05a0bde64b79d08f4a8791e5919151ff353849humbedooh Allow from 127.0.0.1
4c05a0bde64b79d08f4a8791e5919151ff353849humbedooh # Additionally, allow access from local workstation
4c05a0bde64b79d08f4a8791e5919151ff353849humbedooh Allow from 192.168.1.17
4c05a0bde64b79d08f4a8791e5919151ff353849humbedooh</Location>
4c05a0bde64b79d08f4a8791e5919151ff353849humbedooh </highlight>
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 <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 <dd>Only information relevant to the named module</dd>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna <dd>Just the configuration directives, not sorted by module</dd>
9c6bbd67082b5a47fb17cfa5b61b8a7e1fb01875pquerna <dd>Only the list of Hooks each module is attached to</dd>
3d636d91428f2c0a74012c89a94ec7d5b40aa52esf<section id="startup"><title>Dumping the configuration on startup</title>
3d636d91428f2c0a74012c89a94ec7d5b40aa52esf <p>If the config define <code>-DDUMP_CONFIG</code> is set,
3d636d91428f2c0a74012c89a94ec7d5b40aa52esf <module>mod_info</module> will dump the pre-parsed configuration to
c4e9ed6b7b211388ed42d520562a02f8a7fccf49sf <code>stdout</code> during server startup. Pre-parsed means that
c4e9ed6b7b211388ed42d520562a02f8a7fccf49sf directives like
c4e9ed6b7b211388ed42d520562a02f8a7fccf49sf <directive type="section" module="core">IfDefine</directive> and
c4e9ed6b7b211388ed42d520562a02f8a7fccf49sf <directive type="section" module="core">IfModule</directive> are
c4e9ed6b7b211388ed42d520562a02f8a7fccf49sf evaluated and environment varialbles are replaced. However it does
c4e9ed6b7b211388ed42d520562a02f8a7fccf49sf not represent the final state of the configuration. In particular,
c4e9ed6b7b211388ed42d520562a02f8a7fccf49sf it does not represent the merging or overriding that may happen
c4e9ed6b7b211388ed42d520562a02f8a7fccf49sf for repeated directives.</p>
c4e9ed6b7b211388ed42d520562a02f8a7fccf49sf <p>This is roughly equivalent to the <code>?config</code> query.</p>
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 <li>Directives which are executed immediately rather than being
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna stored in the parsed configuration are not listed. These include
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
a6fc6b44b7f8ad7390864b3555341d3abf867f7end <directive type="section" module="core">IfModule</directive> and
a6fc6b44b7f8ad7390864b3555341d3abf867f7end <directive type="section" module="core">IfDefine</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
a6fc6b44b7f8ad7390864b3555341d3abf867f7end <directive type="section" module="core">Directory</directive>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna are listed normally, but <module>mod_info</module> cannot figure
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna out the line number for the closing
a6fc6b44b7f8ad7390864b3555341d3abf867f7end <directive type="section" module="core" name="Directory">/Directory</directive>.</li>
2f83bdeb8f4a4f370e26edf99666e7965c58de22poirier <li>Directives generated by third party modules such as <a href="http://perl.apache.org">mod_perl</a>
9242e4b895c96a03d7c575702cf6b69b5c2702c0pquerna might not be listed.</li>
23171986812b568beef50b28bdca284ab949e774rbowen<directivesynopsis>
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>
72efd3996108e6e17834609af9cf84b95e4c586end <p>This allows the content of <var>string</var> to be shown as
23171986812b568beef50b28bdca284ab949e774rbowen HTML interpreted, <strong>Additional Information</strong> for
4c05a0bde64b79d08f4a8791e5919151ff353849humbedoohAddModuleInfo mod_deflate.c 'See <a \
b5ba1876cc49aa474402affa3372531a9b4ffa5ahumbedooh href="http://httpd.apache.org/docs/&httpd.docs;/mod/mod_deflate.html">\
b5ba1876cc49aa474402affa3372531a9b4ffa5ahumbedooh http://httpd.apache.org/docs/&httpd.docs;/mod/mod_deflate.html</a>'
4c05a0bde64b79d08f4a8791e5919151ff353849humbedooh </highlight>
23171986812b568beef50b28bdca284ab949e774rbowen</directivesynopsis>
23171986812b568beef50b28bdca284ab949e774rbowen</modulesynopsis>