[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apache mysql vhosts


Dr. Ender Aysal wrote:
> Does anybody have an idea how i can tell apache 1.3 to store the
> log-file for each domain in the document-root of every virtual domain
> usingmod_vhost_alias?

From the documentation found at http://httpd.apache.org/docs/vhosts/mass.html

"The main disadvantage is that you cannot have a different log file for each virtual host; however if you have very many virtual hosts then doing this is dubious anyway because it eats file descriptors. It is better to log to a pipe or a fifo and arrange for the process at the other end to distribute the logs to the customers (it can also accumulate statistics, etc.)."

Apache can only use about 250 file descriptors at once, and each logfile uses 1 file descriptor. So if you have many many websites, it might be better to still use the standard /var/log/apache/access.log and add %h at the beginning of the default log format. %h is the virtual hostname.

Then, using a script, you can split the huge logfile into separate logfiles for access analysis for instance (webalizer) with the default format (without the beginning %h that will most likely screw up webalizer).

Try looking at that URL, section "split-logfile and logcron script" :

I use that and it works pretty well..

(that being said, the article also explains why it's a bad idea to store logfiles in the website's home directory...)

Jean-Christophe Montigny
Responsable serveurs assoces.com
Etudiant à Grenoble Ecole de Management
fn:Jean-Christophe Montigny
org;quoted-printable:Association Pl@n=C3=A8tes
adr;quoted-printable:;;12, rue Pierre S=C3=A9mard;Grenoble;FR;38000;France
title:Responsable Com Web

Reply to: