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 have an Apache 1.3 web server configured with several VirtualHost entries that serves multiple independent websites.

At certain times Apache receives a huge amount of request, which causes the server to reach a high workload. I would like to know which of all of these sites are receiving the requests.

How can I do that? I have read about Apache's mod_info module, but I do not know if it has security risks.


share|improve this question
up vote 1 down vote accepted

If you have one log file for each domain e.g. /var/log/apache/domain.tld/access_log

Then you could use watch, sort and du to find out which file changes most rapidly (as apache always adds things to logfiles)

# watch "du -k /var/log/apache/*/access_log |sort -n"

Or if you have a lot of files and you are only interested in thost changing the most

# watch "du -k /var/log/apache/*/access_log |sort -n |tail -30"
share|improve this answer

My recommendation would be to alter your LogFormat to include %v, which is the ServerName of the <VirtualHost> serving the request.

From there, analysis of the logs will allow you to determine where the majority of the requests are coming in to.

share|improve this answer
In this particular case I already have a separated log for each site. But it's a nice alternative too – elitalon Oct 18 '11 at 6:01

You can log the hostname requested with:


You can log the ServerName of the VirtualHost with:

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.