In Apache server, How to change log file location and log format for access log fil?
I installed Apache server with Debian 5.0.2 Lenny. I am trying to write a script which would analysis web log files. I found the log files on /var/log/apache2. There is an access log file, `access.log`.
My question is what configuration file determines the location and the name of the access log file. How can I change them? I used CustomLog in /etc/apache2/apache2.conf like below.
LogFormat ": %h %l %u %t \"%r\" %>s %b" common
CustomLog /home/test/my_log_file common
Apache2 generated /home/test/my_log_file. But no logs were written in the file even after I run `/etc/init.d/apache2 restart`. I changed the log file location. It still didn't work. However, Apache2 still wrote logs in the file `/var/log/apache2/access.log`
Please help me.
Regarding the logs format you can take a look at this. I prefer the combined CustomLog as contaims Referrer and User-Agent, that is good for web site log analysis.
|All times are GMT -5. The time now is 05:08 AM.|