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.min.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="http://wiki.apache.org/httpd/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.4</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.4</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
33configuration</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    <pre class="prettyprint lang-config">&lt;Location /server-info&gt;
43    SetHandler server-info
44&lt;/Location&gt;</pre>
45
46
47    <p>You may wish to use <code class="module"><a href="/mod/mod_authz_host.html">mod_authz_host</a></code> inside the
48    <code class="directive"><a href="/mod/core.html#location">&lt;Location&gt;</a></code>
49    directive to limit access to your server configuration
50    information:</p>
51
52    <pre class="prettyprint lang-config">&lt;Location /server-info&gt;
53    SetHandler server-info
54    Require host example.com
55&lt;/Location&gt;</pre>
56
57
58    <p>Once configured, the server information is obtained by
59    accessing <code>http://your.host.example.com/server-info</code></p>
60</div>
61<div id="quickview"><h3 class="directives">Directives</h3>
62<ul id="toc">
63<li><img alt="" src="/images/down.gif" /> <a href="#addmoduleinfo">AddModuleInfo</a></li>
64</ul>
65<h3>Topics</h3>
66<ul id="topics">
67<li><img alt="" src="/images/down.gif" /> <a href="#security">Security Issues</a></li>
68<li><img alt="" src="/images/down.gif" /> <a href="#queries">Selecting the information shown</a></li>
69<li><img alt="" src="/images/down.gif" /> <a href="#startup">Dumping the configuration on startup</a></li>
70<li><img alt="" src="/images/down.gif" /> <a href="#limitations">Known Limitations</a></li>
71</ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
72<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
73<div class="section">
74<h2><a name="security" id="security">Security Issues</a></h2>
75    <p>Once <code class="module"><a href="/mod/mod_info.html">mod_info</a></code> is loaded into the server, its
76    handler capability is available in <em>all</em> configuration
77    files, including per-directory files (<em>e.g.</em>,
78    <code>.htaccess</code>). This may have security-related
79    ramifications for your site.</p>
80
81    <p>In particular, this module can leak sensitive information
82    from the configuration directives of other Apache modules such as
83    system paths, usernames/passwords, database names, etc. Therefore,
84    this module should <strong>only</strong> be
85    used in a controlled environment and always with caution.</p>
86
87    <p>You will probably want to use <code class="module"><a href="/mod/mod_authz_host.html">mod_authz_host</a></code>
88    to limit access to your server configuration information.</p>
89
90    <div class="example"><h3>Access control</h3><pre class="prettyprint lang-config">&lt;Location /server-info&gt;
91    SetHandler server-info
92    Order allow,deny
93    # Allow access from server itself
94    Allow from 127.0.0.1
95    # Additionally, allow access from local workstation
96    Allow from 192.168.1.17
97&lt;/Location&gt;</pre>
98</div>
99</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
100<div class="section">
101<h2><a name="queries" id="queries">Selecting the information shown</a></h2>
102    <p>By default, the server information includes a list of
103    all enabled modules, and for each module, a description of
104    the directives understood by that module, the hooks implemented
105    by that module, and the relevant directives from the current
106    configuration.</p>
107
108    <p>Other views of the configuration information are available by
109    appending a query to the <code>server-info</code> request. For
110    example, <code>http://your.host.example.com/server-info?config</code>
111    will show all configuration directives.</p>
112
113    <dl>
114        <dt><code>?&lt;module-name&gt;</code></dt>
115            <dd>Only information relevant to the named module</dd>
116        <dt><code>?config</code></dt>
117            <dd>Just the configuration directives, not sorted by module</dd>
118        <dt><code>?hooks</code></dt>
119            <dd>Only the list of Hooks each module is attached to</dd>
120        <dt><code>?list</code></dt>
121            <dd>Only a simple list of enabled modules</dd>
122        <dt><code>?server</code></dt>
123            <dd>Only the basic server information</dd>
124    </dl>
125</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
126<div class="section">
127<h2><a name="startup" id="startup">Dumping the configuration on startup</a></h2>
128    <p>If the config define <code>-DDUMP_CONFIG</code> is set,
129    <code class="module"><a href="/mod/mod_info.html">mod_info</a></code> will dump the pre-parsed configuration to
130    <code>stdout</code> during server startup. Pre-parsed means that
131    directives like
132    <code class="directive"><a href="/mod/core.html#ifdefine">&lt;IfDefine&gt;</a></code> and
133    <code class="directive"><a href="/mod/core.html#ifmodule">&lt;IfModule&gt;</a></code> are
134    evaluated and environment varialbles are replaced. However it does
135    not represent the final state of the configuration. In particular,
136    it does not represent the merging or overriding that may happen
137    for repeated directives.</p>
138
139    <p>This is roughly equivalent to the <code>?config</code> query.</p>
140</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
141<div class="section">
142<h2><a name="limitations" id="limitations">Known Limitations</a></h2>
143    <p><code class="module"><a href="/mod/mod_info.html">mod_info</a></code> provides its information by reading the
144    parsed configuration, rather than reading the original configuration
145    file. There are a few limitations as a result of the way the parsed
146    configuration tree is created:</p>
147    <ul>
148      <li>Directives which are executed immediately rather than being
149          stored in the parsed configuration are not listed. These include
150          <code class="directive"><a href="/mod/core.html#serverroot">ServerRoot</a></code>,
151          <code class="directive"><a href="/mod/mod_so.html#loadmodule">LoadModule</a></code>, and
152          <code class="directive"><a href="/mod/mod_so.html#loadfile">LoadFile</a></code>.</li>
153      <li>Directives which control the configuration file itself, such as
154          <code class="directive"><a href="/mod/core.html#include">Include</a></code>,
155          <code class="directive"><a href="/mod/core.html#ifmodule">&lt;IfModule&gt;</a></code> and
156          <code class="directive"><a href="/mod/core.html#ifdefine">&lt;IfDefine&gt;</a></code> are not
157          listed, but the included configuration directives are.</li>
158      <li>Comments are not listed. (This may be considered a feature.)</li>
159      <li>Configuration directives from <code>.htaccess</code> files are
160          not listed (since they do not form part of the permanent server
161          configuration).</li>
162      <li>Container directives such as
163          <code class="directive"><a href="/mod/core.html#directory">&lt;Directory&gt;</a></code>
164          are listed normally, but <code class="module"><a href="/mod/mod_info.html">mod_info</a></code> cannot figure
165          out the line number for the closing
166          <code class="directive"><a href="/mod/core.html#directory">&lt;/Directory&gt;</a></code>.</li>
167      <li>Directives generated by third party modules such as <a href="http://perl.apache.org">mod_perl</a>
168          might not be listed.</li>
169    </ul>
170</div>
171<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
172<div class="directive-section"><h2><a name="AddModuleInfo" id="AddModuleInfo">AddModuleInfo</a> <a name="addmoduleinfo" id="addmoduleinfo">Directive</a></h2>
173<table class="directive">
174<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Adds additional information to the module
175information displayed by the server-info handler</td></tr>
176<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddModuleInfo <var>module-name</var> <var>string</var></code></td></tr>
177<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
178<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
179<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_info</td></tr>
180</table>
181    <p>This allows the content of <var>string</var> to be shown as
182    HTML interpreted, <strong>Additional Information</strong> for
183    the module <var>module-name</var>. Example:</p>
184
185    <pre class="prettyprint lang-config">AddModuleInfo mod_deflate.c 'See &lt;a \
186    href="http://httpd.apache.org/docs/2.4/mod/mod_deflate.html"&gt;\
187    http://httpd.apache.org/docs/2.4/mod/mod_deflate.html</a>;'</pre>
188
189
190</div>
191</div>
192<div class="bottomlang">
193<p><span>Available Languages: </span><a href="/en/mod/mod_info.html" title="English">&nbsp;en&nbsp;</a> |
194<a href="/fr/mod/mod_info.html" hreflang="fr" rel="alternate" title="Fran�ais">&nbsp;fr&nbsp;</a> |
195<a href="/ja/mod/mod_info.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
196<a href="/ko/mod/mod_info.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
197</div><div class="top"><a href="#page-header"><img src="/images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
198<script type="text/javascript"><!--//--><![CDATA[//><!--
199var comments_shortname = 'httpd';
200var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/mod_info.html';
201(function(w, d) {
202    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
203        d.write('<div id="comments_thread"><\/div>');
204        var s = d.createElement('script');
205        s.type = 'text/javascript';
206        s.async = true;
207        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
208        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
209    }
210    else { 
211        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
212    }
213})(window, document);
214//--><!]]></script></div><div id="footer">
215<p class="apache">Copyright 2014 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>
216<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
217if (typeof(prettyPrint) !== 'undefined') {
218    prettyPrint();
219}
220//--><!]]></script>
221</body></html>