2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
14 http://www.apache.org/licenses/LICENSE-2.0
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
23 <modulesynopsis metafile="mod_info.xml.meta">
26 <description>Provides a comprehensive overview of the server
27 configuration</description>
28 <status>Extension</status>
29 <sourcefile>mod_info.c</sourcefile>
30 <identifier>info_module</identifier>
33 <p>To configure <module>mod_info</module>, add the following to your
34 <code>httpd.conf</code> file.</p>
37 <Location /server-info><br />
39 SetHandler server-info<br />
44 <p>You may wish to use <module>mod_access</module> inside the
45 <directive type="section" module="core">Location</directive>
46 directive to limit access to your server configuration
50 <Location /server-info><br />
52 SetHandler server-info<br />
53 Require host example.com<br />
58 <p>Once configured, the server information is obtained by
59 accessing <code>http://your.host.example.com/server-info</code></p>
62 <section id="security"><title>Security Issues</title>
63 <p>Once <module>mod_info</module> is loaded into the server, its
64 handler capability is available in <em>all</em> configuration
65 files, including per-directory files (<em>e.g.</em>,
66 <code>.htaccess</code>). This may have security-related
67 ramifications for your site.</p>
69 <p>In particular, this module can leak sensitive information
70 from the configuration directives of other Apache modules such as
71 system paths, usernames/passwords, database names, etc. Therefore,
72 this module should <strong>only</strong> be
73 used in a controlled environment and always with caution.</p>
75 <p>You will probably want to use <module>mod_authz_host</module>
76 to limit access to your server configuration information.</p>
78 <example><title>Access control</title>
79 <Location /server-info><br />
81 SetHandler server-info<br />
82 Order allow,deny<br />
83 # Allow access from server itself<br />
84 Allow from 127.0.0.1<br />
85 # Additionally, allow access from local workstation<br />
86 Allow from 192.168.1.17<br />
92 <section id="queries"><title>Selecting the information shown</title>
93 <p>By default, the server information includes a list of
94 all enabled modules, and for each module, a description of
95 the directives understood by that module, the hooks implemented
96 by that module, and the relevant directives from the current
99 <p>Other views of the configuration information are available by
100 appending a query to the <code>server-info</code> request. For
101 example, <code>http://your.host.example.com/server-info?config</code>
102 will show all configuration directives.</p>
105 <dt><code>?<module-name></code></dt>
106 <dd>Only information relevant to the named module</dd>
107 <dt><code>?config</code></dt>
108 <dd>Just the configuration directives, not sorted by module</dd>
109 <dt><code>?hooks</code></dt>
110 <dd>Only the list of Hooks each module is attached to</dd>
111 <dt><code>?list</code></dt>
112 <dd>Only a simple list of enabled modules</dd>
113 <dt><code>?server</code></dt>
114 <dd>Only the basic server information</dd>
118 <section id="limitations"><title>Known Limitations</title>
119 <p><module>mod_info</module> provides its information by reading the
120 parsed configuration, rather than reading the original configuration
121 file. There are a few limitations as a result of the way the parsed
122 configuration tree is created:</p>
124 <li>Directives which are executed immediately rather than being
125 stored in the parsed configuration are not listed. These include
126 <directive module="core">ServerRoot</directive>,
127 <directive module="mod_so">LoadModule</directive>, and
128 <directive module="mod_so">LoadFile</directive>.</li>
129 <li>Directives which control the configuration file itself, such as
130 <directive module="core">Include</directive>,
131 <directive module="core"><IfModule></directive> and
132 <directive module="core"><IfDefine></directive> are not
133 listed, but the included configuration directives are.</li>
134 <li>Comments are not listed. (This may be considered a feature.)</li>
135 <li>Configuration directives from <code>.htaccess</code> files are
136 not listed (since they do not form part of the permanent server
138 <li>Container directives such as
139 <directive module="core"><Directory></directive>
140 are listed normally, but <module>mod_info</module> cannot figure
141 out the line number for the closing
142 <directive module="core"></Directory></directive>.</li>
143 <li>Directives generated by third party modules such as <a href="http://perl.apache.org">mod_perl</a>
144 might not be listed.</li>
149 <name>AddModuleInfo</name>
150 <description>Adds additional information to the module
151 information displayed by the server-info handler</description>
152 <syntax>AddModuleInfo <var>module-name</var> <var>string</var></syntax>
153 <contextlist><context>server config</context><context>virtual host</context>
157 <p>This allows the content of <var>string</var> to be shown as
158 HTML interpreted, <strong>Additional Information</strong> for
159 the module <var>module-name</var>. Example:</p>
162 AddModuleInfo mod_deflate.c 'See <a \<br />
164 href="http://www.apache.org/docs/&httpd.docs;/mod/mod_deflate.html">\<br />
165 http://www.apache.org/docs/&httpd.docs;/mod/mod_deflate.html</a>'