]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_info.html.en
f7d0a0b155cbad1e86eb2fcd61548b0b48932dd5
[apache] / docs / manual / mod / mod_info.html.en
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
4         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5               This file is generated from xml source: DO NOT EDIT
6         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7       -->
8 <title>mod_info - Apache HTTP Server</title>
9 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
12 <script src="../style/scripts/prettify.js" type="text/javascript">
13 </script>
14
15 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
16 <body>
17 <div id="page-header">
18 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
19 <p class="apache">Apache HTTP Server Version 2.5</p>
20 <img alt="" src="../images/feather.gif" /></div>
21 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
22 <div id="path">
23 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.5</a> &gt; <a href="./">Modules</a></div>
24 <div id="page-content">
25 <div id="preamble"><h1>Apache Module mod_info</h1>
26 <div class="toplang">
27 <p><span>Available Languages: </span><a href="../en/mod/mod_info.html" title="English">&nbsp;en&nbsp;</a> |
28 <a href="../fr/mod/mod_info.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
29 <a href="../ja/mod/mod_info.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
30 <a href="../ko/mod/mod_info.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
31 </div>
32 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Provides a comprehensive overview of the server
33 configuration</td></tr>
34 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
35 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>info_module</td></tr>
36 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_info.c</td></tr></table>
37 <h3>Summary</h3>
38
39     <p>To configure <code class="module"><a href="../mod/mod_info.html">mod_info</a></code>, add the following to your
40     <code>httpd.conf</code> file.</p>
41
42     <div class="example"><p><code>
43       &lt;Location /server-info&gt;<br />
44       <span class="indent">
45         SetHandler server-info<br />
46       </span>
47       &lt;/Location&gt;
48     </code></p></div>
49
50     <p>You may wish to use <code class="module"><a href="../mod/mod_access.html">mod_access</a></code> inside the
51     <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code>
52     directive to limit access to your server configuration
53     information:</p>
54
55     <div class="example"><p><code>
56       &lt;Location /server-info&gt;<br />
57       <span class="indent">
58         SetHandler server-info<br />
59         Require host example.com<br />
60       </span>
61       &lt;/Location&gt;
62     </code></p></div>
63
64     <p>Once configured, the server information is obtained by
65     accessing <code>http://your.host.example.com/server-info</code></p>
66 </div>
67 <div id="quickview"><h3 class="directives">Directives</h3>
68 <ul id="toc">
69 <li><img alt="" src="../images/down.gif" /> <a href="#addmoduleinfo">AddModuleInfo</a></li>
70 </ul>
71 <h3>Topics</h3>
72 <ul id="topics">
73 <li><img alt="" src="../images/down.gif" /> <a href="#security">Security Issues</a></li>
74 <li><img alt="" src="../images/down.gif" /> <a href="#queries">Selecting the information shown</a></li>
75 <li><img alt="" src="../images/down.gif" /> <a href="#startup">Dumping the configuration on startup</a></li>
76 <li><img alt="" src="../images/down.gif" /> <a href="#limitations">Known Limitations</a></li>
77 </ul></div>
78 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
79 <div class="section">
80 <h2><a name="security" id="security">Security Issues</a></h2>
81     <p>Once <code class="module"><a href="../mod/mod_info.html">mod_info</a></code> is loaded into the server, its
82     handler capability is available in <em>all</em> configuration
83     files, including per-directory files (<em>e.g.</em>,
84     <code>.htaccess</code>). This may have security-related
85     ramifications for your site.</p>
86
87     <p>In particular, this module can leak sensitive information
88     from the configuration directives of other Apache modules such as
89     system paths, usernames/passwords, database names, etc. Therefore,
90     this module should <strong>only</strong> be
91     used in a controlled environment and always with caution.</p>
92
93     <p>You will probably want to use <code class="module"><a href="../mod/mod_authz_host.html">mod_authz_host</a></code>
94     to limit access to your server configuration information.</p>
95
96     <div class="example"><h3>Access control</h3><p><code>
97       &lt;Location /server-info&gt;<br />
98       <span class="indent">
99         SetHandler server-info<br />
100         Order allow,deny<br />
101         # Allow access from server itself<br />
102         Allow from 127.0.0.1<br />
103         # Additionally, allow access from local workstation<br />
104         Allow from 192.168.1.17<br />
105       </span>
106       &lt;/Location&gt;
107     </code></p></div>
108 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
109 <div class="section">
110 <h2><a name="queries" id="queries">Selecting the information shown</a></h2>
111     <p>By default, the server information includes a list of
112     all enabled modules, and for each module, a description of
113     the directives understood by that module, the hooks implemented
114     by that module, and the relevant directives from the current
115     configuration.</p>
116
117     <p>Other views of the configuration information are available by
118     appending a query to the <code>server-info</code> request. For
119     example, <code>http://your.host.example.com/server-info?config</code>
120     will show all configuration directives.</p>
121
122     <dl>
123         <dt><code>?&lt;module-name&gt;</code></dt>
124             <dd>Only information relevant to the named module</dd>
125         <dt><code>?config</code></dt>
126             <dd>Just the configuration directives, not sorted by module</dd>
127         <dt><code>?hooks</code></dt>
128             <dd>Only the list of Hooks each module is attached to</dd>
129         <dt><code>?list</code></dt>
130             <dd>Only a simple list of enabled modules</dd>
131         <dt><code>?server</code></dt>
132             <dd>Only the basic server information</dd>
133     </dl>
134 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
135 <div class="section">
136 <h2><a name="startup" id="startup">Dumping the configuration on startup</a></h2>
137     <p>If the config define <code>-DDUMP_CONFIG</code> is set,
138     <code class="module"><a href="../mod/mod_info.html">mod_info</a></code> will dump the pre-parsed configuration to
139     <code>stdout</code> during server startup. This is roughly equivalent
140     to the <code>?config</code> query.</p>
141 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
142 <div class="section">
143 <h2><a name="limitations" id="limitations">Known Limitations</a></h2>
144     <p><code class="module"><a href="../mod/mod_info.html">mod_info</a></code> provides its information by reading the
145     parsed configuration, rather than reading the original configuration
146     file. There are a few limitations as a result of the way the parsed
147     configuration tree is created:</p>
148     <ul>
149       <li>Directives which are executed immediately rather than being
150           stored in the parsed configuration are not listed. These include
151           <code class="directive"><a href="../mod/core.html#serverroot">ServerRoot</a></code>,
152           <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code>, and
153           <code class="directive"><a href="../mod/mod_so.html#loadfile">LoadFile</a></code>.</li>
154       <li>Directives which control the configuration file itself, such as
155           <code class="directive"><a href="../mod/core.html#include">Include</a></code>,
156           <code class="directive"><a href="../mod/core.html#&lt;ifmodule&gt;">&lt;IfModule&gt;</a></code> and
157           <code class="directive"><a href="../mod/core.html#&lt;ifdefine&gt;">&lt;IfDefine&gt;</a></code> are not
158           listed, but the included configuration directives are.</li>
159       <li>Comments are not listed. (This may be considered a feature.)</li>
160       <li>Configuration directives from <code>.htaccess</code> files are
161           not listed (since they do not form part of the permanent server
162           configuration).</li>
163       <li>Container directives such as
164           <code class="directive"><a href="../mod/core.html#&lt;directory&gt;">&lt;Directory&gt;</a></code>
165           are listed normally, but <code class="module"><a href="../mod/mod_info.html">mod_info</a></code> cannot figure
166           out the line number for the closing
167           <code class="directive"><a href="../mod/core.html#&lt;/directory&gt;">&lt;/Directory&gt;</a></code>.</li>
168       <li>Directives generated by third party modules such as <a href="http://perl.apache.org">mod_perl</a>
169           might not be listed.</li>
170     </ul>
171 </div>
172 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
173 <div class="directive-section"><h2><a name="AddModuleInfo" id="AddModuleInfo">AddModuleInfo</a> <a name="addmoduleinfo" id="addmoduleinfo">Directive</a></h2>
174 <table class="directive">
175 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Adds additional information to the module
176 information displayed by the server-info handler</td></tr>
177 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddModuleInfo <var>module-name</var> <var>string</var></code></td></tr>
178 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
179 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
180 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_info</td></tr>
181 </table>
182     <p>This allows the content of <var>string</var> to be shown as
183     HTML interpreted, <strong>Additional Information</strong> for
184     the module <var>module-name</var>. Example:</p>
185
186     <div class="example"><p><code>
187       AddModuleInfo mod_deflate.c 'See &lt;a \<br />
188       <span class="indent">
189         href="http://www.apache.org/docs/trunk/mod/mod_deflate.html"&gt;\<br />
190         http://www.apache.org/docs/trunk/mod/mod_deflate.html&lt;/a&gt;'
191       </span>
192     </code></p></div>
193
194 </div>
195 </div>
196 <div class="bottomlang">
197 <p><span>Available Languages: </span><a href="../en/mod/mod_info.html" title="English">&nbsp;en&nbsp;</a> |
198 <a href="../fr/mod/mod_info.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
199 <a href="../ja/mod/mod_info.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
200 <a href="../ko/mod/mod_info.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
201 </div><div id="footer">
202 <p class="apache">Copyright 2012 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
203 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript">
204     if (prettyPrint) {
205         prettyPrint();
206     }
207 </script>
208 </body></html>