Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on a big web application which uses Apache 2.2 with a complicated configuration of virtual hosts that are defined in many distributed vhost.conf files which are then included into httpd.conf.

Is there any simple and quick way of listing out all of the various virtual host configurations in one place?

share|improve this question
up vote 3 down vote accepted

Running httpd -S will show you the defined VirtualHosts.

share|improve this answer
Thanks - this is exactly what I was looking for :) – Xoundboy Jun 23 '11 at 11:58

You can get a listing of all active virtual hosts along with what port and name they run on and what line of what config file they can be found on by using the status operator on the apache init scripts:

service httpd status

If your distro doesn't include that option in the init scripts, you can call it manually using

/path/to/httpd -t -f /path/to/main/config
share|improve this answer

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.