View Full Version : Combined Web Server Logs

07-29-2006, 04:58 PM
At my previous hosting company, I had a combined web server log that I imported in my stats program. The file would overwrite the one from the previous day. Each file was a month's worth of log data.

From what I can tell with West Host, I have 2 daily files. One is the access_log and the other is a referrer_log. It looks like it only keeps 5 days worth.

Is there any way to get the data in the combined format? I don't see anything on Control Panel. My guess is that there is some sort of configuration I can do, but I'm not sure where to start.

I did do a search in the forums, but didn't see any related topics. I did a search with Google and saw this reference

Combined Log Format

Another commonly used format string is called the Combined Log Format. It can be used as follows.

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined
CustomLog log/acces_log combined

I'm not sure if this is what I'm looking for and where I would place this text.

Thanks in advance.

07-30-2006, 08:01 AM

The access_log is a combined log, and it uses the same log format as the one you posted. The settings for this can be found in the /etc/httpd/conf/httpd.conf file.
Westhost accounts have a cron job that runs every day that rotates the logs if they're over 1MB in size. You can change the size settings in the logrotate.conf file which is located in the /etc directory.

07-30-2006, 09:19 PM
Thanks for the file locations. Something must be wrong on my set up based on what you say. If I import the access log*.gz, I only get 34 vistors which is not right. Google Analytics seems to be reporting as normal in terms of visitors but they use their own JS to measure.

07-31-2006, 11:15 AM
Are the reporting periods the same? By default, logrotate only rotates a log 5 times before it's deleted.