I'm trying to figure out what is the full complete configuration of an httpd setup.
All the configurations files are scattered in different files (/etc/httpd/conf.d, httpd.conf, various mod configs)
Is there a way to list the final httpd configuration?
Like the whole running setup configuration in a single file?
Please use mod_info for that purpose: http://httpd.apache.org/docs/2.2/mod/mod_info.html
only down side is that if you need it to recover a deleted config and haven't already loaded the module it won't help you much
As described in the Apache HTTP Server Documentation
DUMP_CONFIG
requiresmod_info
enabled:a2enmod info
!In Ubuntu do the following
If you want to strip the line numbers do
or redirect to a file
As noted by arco444, you can use
apachectl -S
to display an overview of the VirtualHosts currently running from the configs, andapachectl -M
to display all currently loaded modules - I'm not aware of a tool to display the verbose output of all configs parsed (and which order they were parsed in) at launch of httpd, but I would recommend that you familiarise yourself with the general structure of the httpd config files:Of particular note to your question: the 'main' apache config file is located in
/etc/httpd/conf/httpd.conf
(in the region of line 221 on a default httpd installation from the repos included in CentOS 6, which I assume you are using based on your post tags), and the 'supplementary' config files are located in/etc/httpd/conf.d
and require to be included explicitly in the main config file. For example, if you search thehttpd.conf
file for the term 'Include
', you will find the lineInclude conf.d/*.conf
which is what includes all files of extension.conf
in the subdirectoryconf.d
- in alphabetical order, so you will want to familiarise yourself with the importance of config file parsing at some point if possible.As an aside, if you are using a shell based text editor such as vim, I suggest that you enable line numbering and syntax highlighting by default so that such lengthy config files are a bit easier to parse yourself and navigate - in the case of vim, you'd do so by creating a file in your home directory called
.vimrc
(or append to an existing one) and add the following lines: