Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 a CentOS Based server. Each domain has its own entry in vhosts.

Everything is logged in /var/log/httpd/access_log.

How can I find out what domains are using up bandwidth?

It is running with Apache. In the access log i can only see the GET /index.php (or whatever), not the actual hostname (/domain), and also the referer (so i can half work out what pages are popular).

What can I do to log the full request URI's, and also to parse them and see what is most popular?


share|improve this question

In the <VirtualHost> block for a given VirtualHost you can specify a CustomLog entry to make requests going to that virtual host go to its own log file. This Stack Overflow question provides an example:

<VirtualHost *:80>
 DocumentRoot /var/www/domains/
 ErrorLog /var/www/domains/
 CustomLog /var/www/domains/ common
 php_flag log_errors on
 php_flag display_errors on
 php_value error_reporting 30719
 php_value error_log /var/www/domains/

So this should enable you to split everything by vhost and let you get meaningful statistics.

share|improve this answer
How would i get the http host (i.e. domain/virtual host name) in the customlog? With "%v The canonical ServerName of the server serving the request." ? – slycat Mar 24 '13 at 18:06

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.