PDA

View Full Version : Apache 2 access log for each subdir


Mordachai
March 16th, 2009, 03:36 PM
Ive setup an apache 2 webserver containing several virtual hosts. Now on one of the hosts I want a subdirectory that has a different access log then the rest of that virtual host (its a site with multple tools who need different access logs)

Is this possible?

bodhi.zazen
March 16th, 2009, 03:39 PM
Yes, specify a log file in your Virtual Host.

I personally make a separate log for each virtual host, makes it easier if there are problems.

Mordachai
March 16th, 2009, 03:57 PM
I already have an accesslog for my virtual host. I just want a separate accesslog for a subdirectory of that virtual host. So if my vhost is located in /var/www/vhost1, I want a separate accesslog for anything going to /var/www/vhost1/subdir1.