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

Was wondering if there was a way to see which virtual host entry is used for routing a request? Is there some way to add the name of the virtual host file being used for the request to the access.log file?

share|improve this question
up vote 6 down vote accepted

The LogFormat directive can take a %v placeholder which does exactly what you want.

The LogFormat options are documented here:

share|improve this answer

I find the Host: header to be very useful as well, add this to your LogFormat directive:

share|improve this answer
They return different values, so depending on your scenario you may want both. %v returns the Servername of the vhost the request landed on. – adaptr Mar 12 '12 at 16:17

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.