Moved apache code into a folder to help prepare for packaging where we dont want...
[httpd-crcsyncproxy.git] / apache / docs / manual / mod / mod_info.xml
blob52555c51fcb6d4db2212770e359feea052daa455
1 <?xml version="1.0"?>
2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
6 <!--
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.
21 -->
23 <modulesynopsis metafile="mod_info.xml.meta">
25 <name>mod_info</name>
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>
32 <summary>
33     <p>To configure <module>mod_info</module>, add the following to your
34     <code>httpd.conf</code> file.</p>
36     <example>
37       &lt;Location /server-info&gt;<br />
38       <indent>
39         SetHandler server-info<br />
40       </indent>
41       &lt;/Location&gt;
42     </example>
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
47     information:</p>
49     <example>
50       &lt;Location /server-info&gt;<br />
51       <indent>
52         SetHandler server-info<br />
53         Order deny,allow<br />
54         Deny from all<br />
55         Allow from yourcompany.com<br />
56       </indent>
57       &lt;/Location&gt;
58     </example>
60     <p>Once configured, the server information is obtained by
61     accessing <code>http://your.host.example.com/server-info</code></p>
62 </summary>
64 <section id="security"><title>Security Issues</title>
65     <p>Once <module>mod_info</module> is loaded into the server, its
66     handler capability is available in <em>all</em> configuration
67     files, including per-directory files (<em>e.g.</em>,
68     <code>.htaccess</code>). This may have security-related
69     ramifications for your site.</p>
71     <p>In particular, this module can leak sensitive information
72     from the configuration directives of other Apache modules such as
73     system paths, usernames/passwords, database names, etc. Therefore,
74     this module should <strong>only</strong> be
75     used in a controlled environment and always with caution.</p>
77     <p>You will probably want to use <module>mod_authz_host</module> 
78     to limit access to your server configuration information.</p>
79       
80     <example><title>Access control</title>
81       &lt;Location /server-info&gt;<br />
82       <indent>
83         SetHandler server-info<br />
84         Order allow,deny<br />
85         # Allow access from server itself<br />
86         Allow from 127.0.0.1<br />
87         # Additionally, allow access from local workstation<br />
88         Allow from 192.168.1.17<br />
89       </indent>
90       &lt;/Location&gt;
91     </example>
92 </section>
94 <section id="queries"><title>Selecting the information shown</title>
95     <p>By default, the server information includes a list of
96     all enabled modules, and for each module, a description of
97     the directives understood by that module, the hooks implemented
98     by that module, and the relevant directives from the current
99     configuration.</p>
100     
101     <p>Other views of the configuration information are available by
102     appending a query to the <code>server-info</code> request. For
103     example, <code>http://your.host.example.com/server-info?config</code>
104     will show all configuration directives.</p>
105     
106     <dl>
107         <dt><code>?&lt;module-name&gt;</code></dt>
108             <dd>Only information relevant to the named module</dd>
109         <dt><code>?config</code></dt>
110             <dd>Just the configuration directives, not sorted by module</dd>
111         <dt><code>?hooks</code></dt>
112             <dd>Only the list of Hooks each module is attached to</dd>
113         <dt><code>?list</code></dt>
114             <dd>Only a simple list of enabled modules</dd>
115         <dt><code>?server</code></dt>
116             <dd>Only the basic server information</dd>
117     </dl>
118 </section>
120 <section id="limitations"><title>Known Limitations</title>
121     <p><module>mod_info</module> provides its information by reading the
122     parsed configuration, rather than reading the original configuration
123     file. There are a few limitations as a result of the way the parsed
124     configuration tree is created:</p>
125     <ul>
126       <li>Directives which are executed immediately rather than being
127           stored in the parsed configuration are not listed. These include
128           <directive module="core">ServerRoot</directive>,
129           <directive module="mod_so">LoadModule</directive>, and
130           <directive module="mod_so">LoadFile</directive>.</li>
131       <li>Directives which control the configuration file itself, such as
132           <directive module="core">Include</directive>,
133           <directive module="core">&lt;IfModule&gt;</directive> and
134           <directive module="core">&lt;IfDefine&gt;</directive> are not
135           listed, but the included configuration directives are.</li>
136       <li>Comments are not listed. (This may be considered a feature.)</li>
137       <li>Configuration directives from <code>.htaccess</code> files are
138           not listed (since they do not form part of the permanent server
139           configuration).</li>
140       <li>Container directives such as
141           <directive module="core">&lt;Directory&gt;</directive>
142           are listed normally, but <module>mod_info</module> cannot figure
143           out the line number for the closing
144           <directive module="core">&lt;/Directory&gt;</directive>.</li>
145       <li>Directives generated by third party modules such as <module>mod_perl</module>
146           might not be listed.</li>
147     </ul>
148 </section>
150 <directivesynopsis>
151 <name>AddModuleInfo</name>
152 <description>Adds additional information to the module
153 information displayed by the server-info handler</description>
154 <syntax>AddModuleInfo <var>module-name</var> <var>string</var></syntax>
155 <contextlist><context>server config</context><context>virtual host</context>
156 </contextlist>
157 <compatibility>Apache 1.3 and above</compatibility>
159 <usage>
160     <p>This allows the content of <var>string</var> to be shown as
161     HTML interpreted, <strong>Additional Information</strong> for
162     the module <var>module-name</var>. Example:</p>
164     <example>
165       AddModuleInfo mod_deflate.c 'See &lt;a \<br />
166       <indent>
167         href="http://www.apache.org/docs/&httpd.docs;/mod/mod_deflate.html"&gt;\<br />
168         http://www.apache.org/docs/&httpd.docs;/mod/mod_deflate.html&lt;/a&gt;'
169       </indent>
170     </example>
171 </usage>
173 </directivesynopsis>
174 </modulesynopsis>