Bug 59376 - Provide an option to dump included configuration paths
Summary: Provide an option to dump included configuration paths
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.5-HEAD
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Keywords: FixedInTrunk, PatchAvailable
Depends on:
Reported: 2016-04-25 22:44 UTC by Jacob Champion
Modified: 2016-07-11 19:14 UTC (History)
0 users

0001: Add a DUMP_INCLUDES switch to show config files (5.95 KB, patch)
2016-04-25 22:44 UTC, Jacob Champion
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Champion 2016-04-25 22:44:58 UTC
Created attachment 33804 [details]
0001: Add a DUMP_INCLUDES switch to show config files

When debugging a complex (or legacy) configuration, it can be helpful to know exactly which configuration files are being parsed and in what order. This is also useful when providing support for platforms with more complicated configuration conventions (such as Debian/Ubuntu). These users know the server's entry point (httpd/apachectl), but they may know very little about the rest of the system.

The attached patch provides a DUMP_INCLUDES option, which prints all parsed configuration files' locations, as well as the line numbers from which they were Included, in a basic tree.

(mod_info provides a much lower-level DUMP_CONFIG option that also prints the file locations, but it requires mod_info to be loaded -- which in turn requires editing the configuration we're trying to get information about -- and it presents its information in a flat dump. In other words, it's designed to answer the question, "What configuration directives are being set?" I also want to answer the question, "Where are the configuration directives coming from?")
Comment 1 Gregg L. Smith 2016-06-06 17:24:58 UTC
This could have helped me out more than once, I like it.
Comment 2 Eric Covener 2016-06-10 22:45:05 UTC
Thanks Jacob, added to trunk in 1747808.
Comment 3 Jacob Champion 2016-07-11 19:14:22 UTC
Backported in r1748327; released (publicly) in 2.4.23.