From 55b2bc486686f5dc81d6a9135cbde96c9388a62d Mon Sep 17 00:00:00 2001
From: Paul Querna
You may wish to add a
- <Limit>
- clause inside the
- <Location>
- directive to limit access to your server configuration
- information.
Once configured, the server information is obtained by
accessing http://your.host.dom/server-info
User
directive), or
- else the directive settings will not be listed.
-
- It should also be noted that if
- mod_info
is compiled into the server, its
- handler capability is available in all configuration
- files, including per-directory files (e.g.,
- .htaccess
). This may have security-related
- ramifications for your site.
In particular, this module can leak sensitive information - from the configuration directives of other Apache modules such as - system paths, usernames/passwords, database names, etc. Due to - the way this module works there is no way to block information - from it. Therefore, this module should only be - used in a controlled environment and always with caution.
-Once mod_info
is loaded into the server, its
+ handler capability is available in all configuration
+ files, including per-directory files (e.g.,
+ .htaccess
). This may have security-related
+ ramifications for your site.
In particular, this module can leak sensitive information + from the configuration directives of other Apache modules such as + system paths, usernames/passwords, database names, etc. Therefore, + this module should only be + used in a controlled environment and always with caution.
+You will probably want to use mod_access
+ to limit access to your server configuration information.
+ <Location /server-info>
+
+ SetHandler server-info
+ Order allow,deny
+ # Allow access from server itself
+ Allow from 127.0.0.1
+ # Additionally, allow access from local workstation
+ Allow from 192.168.1.17
+
+ </Location>
+
By default, the server information includes a list of + all enabled modules, and for each module, a description of + the directives understood by that module, the hooks implemented + by that module, and the relevant directives from the current + configuration.
+ +Other views of the configuration information are available by
+ appending a query to the server-info
request. For
+ example, http://your.host.dom/server-info?config
+ will show all configuration directives.
?<module-name>
?config
?list
?server
mod_info
provides its information by reading the
+ parsed configuration, rather than reading the original configuration
+ file. There are a few limitations as a result of the way the parsed
+ configuration tree is created:
ServerRoot
,
+ LoadModule
, and
+ LoadFile
.Include
,
+ <IfModule>
and
+ <IfDefine>
are not
+ listed, but the included configuration directives are..htaccess
files are
+ not listed (since they do not form part of the permanent server
+ configuration).<Directory>
+ are listed normally, but mod_info
cannot figure
+ out the line number for the closing
+ </Directory>
.mod_perl
+ might not be listed.