httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Httpd Wiki] Update of "ScanHTTPDConf" by SeanTimmins
Date Mon, 30 Mar 2015 11:45:52 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Httpd Wiki" for change notification.

The "ScanHTTPDConf" page has been changed by SeanTimmins:
https://wiki.apache.org/httpd/ScanHTTPDConf

New page:
= HTTPD Configuration scanner =

"scanconf.pl" is a script that reads the top level Apache HTTPD configuration file and scans
through it parsing all include files found in order to search the whole server configuration
for any given directives. The search is case insensitive.

The current script can be found here: http://www.unbeliever.plus.com/apache/scripts/scanconf.pl

All the script needs to run the path to the top level configuration file and sometimes the
server root (if it is not defined in the configuration file itself), both of which can be
supplied via arguments.

== Usage and Arguments ==

The common locations of the top level configuration file are hard coded into the script. They
were taken from [[DistrosDefaultLayout]]. If none of these are found the file must be specified
using the -c flag.

The default output shows the line number the directive was found at and the file it came from.

The various arguments are.

 * -c /path/to/file: specify path to top level configuration file.
 * -F: Suppress the printing the file name after each directive.
 * -h: Print the help message.
 * -L: Suppress the printing of line numbers.
 * -s /path/to/server/root: specify server root as some distributions use a 'default'.
 * -q: quiet mode, only print the 'directives' lines of output.
 * -v: output the full config line rather than just the directive.

== Example Usage ==

The following show some examples of how to use the script. The last one actually dumps the
whole active configuration without comments (possibly useful for configuration comparison?).

 * Show "Include" lines and all configuration files:: scanconf.pl
 * Search for a specific directive:: scanconf.pl directory
 * Search for multiple directives:: scanconf.pl location directory allow
 * Specify the top level httpd config file:: scanconf.pl -c /etc/httpd/apache2.conf
 * Dump all configuration including arguments to all directives:: scanconf.pl -q -v -F -L
All

== Possible Enhancements ==

 * Execute {{{apachectl -V}}} to determine a default ServerRoot.
 * Tidy up output for the longer directives.

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Mime
View raw message