Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is there any way to display the effective configuration values that Apache is using?

I have a cPanel server that uses multiple include files and there are some server-wide settings that are defined in multiple places. I'd like to find a way of confirming which value Apache is actually using while it's running.

share|improve this question

2 Answers 2

up vote 12 down vote accepted

mod_info provides what you need, I think.

<Location /server-info>
   SetHandler server-info
   Order deny,allow
   Deny from all
   Allow from # your IP, subnet, whatever

More here: http://httpd.apache.org/docs/2.2/mod/mod_info.html

You can also list the configuration of your VirtualHosts (less info than using the above) using the command sudo httpd -S.

share|improve this answer
Lucky me, mod_info was already compiled in too. –  Dave Forgac Jul 18 '09 at 18:37

Can you specify which value you want to find out? Have a look at phpinfo(); output to see if you can find what you are looking for, in case the server supports PHP.

The simple code that calls phpinfo(); and display output is

<?php phpinfo(); ?>
share|improve this answer
In this case I'm looking for the KeepAlive and KeepAliveTimeout in the main config. I think mod_info looks promising so I'm going to check that out. –  Dave Forgac Jul 18 '09 at 18:13
The question is clear. He is not looking to see php setting, but effective httpd setting it is running. –  Naai Sekar Aug 17 '12 at 4:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.