Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Got a weird issue with the apache access logs. I am getting an entry for the site written to

/var/log/apache2/access.log

AND

/var/log/apache2/other_vhosts/access.log

I am using Debian 6, with the latest Apache in the repo. When I look at the file

/etc/apache2/conf.d/other-vhosts-access-log

It says

# Define an access log for VirtualHosts that don't define their own logfile
CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined

but when I look in my VirtualHost declaration for the site, it has

    CustomLog ${APACHE_LOG_DIR}/access.log vhost_combined
</VirtualHost>

at the bottom of the file. So I have declared the log file, so why does apache still write an entry to the other_vhosts_access.log?

In the end, I commented out the line in the apache/conf.d file, but doesn't feel like it's the best way.

What am I missing?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Without seeing the full apache configuration this is difficult to diagnose but some things to look at

  • Check that you're not including or defining a second log file within the same vhost - this will cause double logging.
  • Check that the log files aren't linked to each other - find /var/log/apache2 -samefile /var/log/apache2/access.log will list them both if this is true.

Consider the possibility that this is a bug.

share|improve this answer

Try with

CustomLog ${APACHE_LOG_DIR}/access.log combined

share|improve this answer
1  
That's not an answer to the question. –  Jenny D Mar 11 '13 at 10:19

Your Answer

 
discard

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.