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 using Apache in Ubuntu with several vhosts created, all pointing to the same access log. I'm already login the virtual host domain.

I'm looking for a way to have statistics reports that shows information of all vhosts in the same report, something like:

vhosts ------ visits --- 3 --- 8

I already check tools like awstats, webalizer, goaccess and others, but I only can get from them separated reports per vhost or only one report including all vhosts as if they were only one.

I checked another answers like tool for analyzing apache logs, A software to analyze Apache log is needed and Web log analyzer that can generate a single report for multiple domains? but doesn't solve my needs either.

Take in consideration that I doesn't want reports like I get from awstats (after some configuration) for all my vhosts resources, I want to check the differences between vhosts.

My log format is (can be changed if needed):

LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\""

And the log looks like: - - [28/May/2013:12:23:25 -0300] "GET /test.php HTTP/1.1" 200 301 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36" - - [28/May/2013:12:26:30 -0300] "GET /test.php HTTP/1.1" 200 301 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36"

Just let me know if another information is required. Thanks in advanced.

share|improve this question

You could use a simple shell script to count the number of occurrences of each virtual host:

$ awk '{print $1}' access.log | sort | uniq -c | sort -gr
share|improve this answer
Thanks, all seems that I should use shell scripts as you mention, or a tool like awstats or webalizer with information per vhost. I can't find a tool that show reports centralizing all vhosts. – leticia Jun 3 '13 at 18:48
up vote 0 down vote accepted

For archive purpose:

I found that webalizer has a section where I can check the Hits, Files, KBytes and Visits of the list of vhosts in my Apache. The section is "[Sites]"

Just be sure of use a LogFormat that includes the vhost, for example:

LogFormat "%v:%p %h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i"" vhost_combined

The log appears as:

enter image description here

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.