675N/A<!-- $LastChangedRevision$ --> 675N/A Licensed to the Apache Software Foundation (ASF) under one or more 675N/A contributor license agreements. See the NOTICE file distributed with 675N/A this work for additional information regarding copyright ownership. 675N/A The ASF licenses this file to You under the Apache License, Version 2.0 675N/A (the "License"); you may not use this file except in compliance with 675N/A the License. You may obtain a copy of the License at 675N/A Unless required by applicable law or agreed to in writing, software 675N/A distributed under the License is distributed on an "AS IS" BASIS, 675N/A WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 675N/A See the License for the specific language governing permissions and 675N/A limitations under the License. 675N/A<
description>Provides a comprehensive overview of the server
675N/Aconfiguration</
description>
675N/A<
status>Extension</
status>
675N/A<
identifier>info_module</
identifier>
675N/A <
p>To configure <
module>mod_info</
module>, add the following to your
675N/A <
highlight language="config">
675N/A<Location /server-info>
675N/A <
p>You may wish to use <
module>mod_authz_host</
module> inside the
675N/A <
directive type="section" module="core">Location</
directive>
675N/A directive to limit access to your server configuration
675N/A <
highlight language="config">
675N/A<Location /server-info>
675N/A <
p>Once configured, the server information is obtained by
675N/A<
section id="security"><
title>Security Issues</
title>
675N/A <
p>Once <
module>mod_info</
module> is loaded into the server, its
675N/A handler capability is available in <
em>all</
em> configuration
675N/A files, including per-directory files (<
em>
e.g.</
em>,
675N/A <
code>.htaccess</
code>). This may have security-related
675N/A ramifications for your site.</
p>
675N/A <
p>In particular, this module can leak sensitive information
675N/A from the configuration directives of other Apache modules such as
675N/A this module should <
strong>only</
strong> be
675N/A used in a controlled environment and always with caution.</
p>
675N/A <
p>You will probably want to use <
module>mod_authz_host</
module>
675N/A to limit access to your server configuration information.</
p>
675N/A <
example><
title>Access control</
title>
675N/A <
highlight language="config">
675N/A<Location /server-info>
675N/A # Allow access from server itself
675N/A # Additionally, allow access from local workstation
675N/A Allow from 192.168.1.17
675N/A<
section id="queries"><
title>Selecting the information shown</
title>
675N/A <
p>By default, the server information includes a list of
675N/A all enabled modules, and for each module, a description of
675N/A the directives understood by that module, the hooks implemented
675N/A by that module, and the relevant directives from the current
675N/A <
p>Other views of the configuration information are available by
675N/A appending a query to the <
code>server-info</
code> request. For
675N/A will show all configuration directives.</
p>
675N/A <
dt><
code>?<module-name></
code></
dt>
675N/A <
dd>Only information relevant to the named module</
dd>
675N/A <
dt><
code>?config</
code></
dt>
675N/A <
dd>Just the configuration directives, not sorted by module</
dd>
675N/A <
dt><
code>?hooks</
code></
dt>
675N/A <
dd>Only the list of Hooks each module is attached to</
dd>
675N/A <
dt><
code>?list</
code></
dt>
675N/A <
dd>Only a simple list of enabled modules</
dd>
675N/A <
dt><
code>?server</
code></
dt>
675N/A <
dd>Only the basic server information</
dd>
675N/A<
section id="startup"><
title>Dumping the configuration on startup</
title>
675N/A <
p>If the config define <
code>-DDUMP_CONFIG</
code> is set,
675N/A <
module>mod_info</
module> will dump the pre-parsed configuration to
675N/A <
code>stdout</
code> during server startup. Pre-parsed means that
675N/A <
directive type="section" module="core">IfDefine</
directive> and
675N/A <
directive type="section" module="core">IfModule</
directive> are
675N/A evaluated and environment varialbles are replaced. However it does
675N/A not represent the final state of the configuration. In particular,
675N/A it does not represent the merging or overriding that may happen
675N/A for repeated directives.</
p>
675N/A <
p>This is roughly equivalent to the <
code>?config</
code> query.</
p>
675N/A<
section id="limitations"><
title>Known Limitations</
title>
675N/A <
p><
module>mod_info</
module> provides its information by reading the
675N/A parsed configuration, rather than reading the original configuration
675N/A file. There are a few limitations as a result of the way the parsed
675N/A configuration tree is created:</
p>
675N/A <
li>Directives which are executed immediately rather than being
675N/A stored in the parsed configuration are not listed. These include
675N/A <
directive module="core">ServerRoot</
directive>,
675N/A <
directive module="mod_so">LoadModule</
directive>, and
675N/A <
directive module="mod_so">LoadFile</
directive>.</
li>
675N/A <
li>Directives which control the configuration file itself, such as
675N/A <
directive module="core">Include</
directive>,
675N/A <
directive module="core"><IfModule></
directive> and
675N/A <
directive module="core"><IfDefine></
directive> are not
675N/A listed, but the included configuration directives are.</
li>
675N/A <
li>Comments are not listed. (This may be considered a feature.)</
li>
675N/A <
li>Configuration directives from <
code>.htaccess</
code> files are
675N/A not listed (since they do not form part of the permanent server
675N/A <
li>Container directives such as
675N/A <
directive module="core"><Directory></
directive>
675N/A are listed normally, but <
module>mod_info</
module> cannot figure
675N/A out the line number for the closing
675N/A <
directive module="core"></Directory></
directive>.</
li>
675N/A might not be listed.</
li>
675N/A<
name>AddModuleInfo</
name>
675N/A<
description>Adds additional information to the module
675N/Ainformation displayed by the server-info handler</
description>
675N/A<
syntax>AddModuleInfo <
var>module-name</
var> <
var>string</
var></
syntax>
675N/A<
contextlist><
context>server config</
context><
context>virtual host</
context>
675N/A <
p>This allows the content of <
var>string</
var> to be shown as
675N/A HTML interpreted, <
strong>Additional Information</
strong> for
675N/A the module <
var>module-name</
var>. Example:</
p>
675N/A <
highlight language="config">