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