Log file path for stats (awstats / webalizer)

If on a cluster we merge apache access log files using a program as explained here http://blog.alanthing.com/combined-apache-logs-for-load-balanced-web-se Virtualmin fails to pick up the log file location to feed awstats.

There could be a template for awstats to look up and set the log file location.for all virtual servers created.

Status: 
Closed (fixed)

Comments

So are you looking for a way to combine logs for a domain from multiple systems into a single AWstats or Webalizer report?

The best way to do this would be to have them copied to /var/log/virtualmin on the system that AWstats runs, and named like domain.com_access_log.host1 , domain.com_access_log.host2, etc. Virtualmin will include all log files whose name starts with domain.com_access_log when generating reports - this was done to pick up rotated logs, but would work in your case too..

Yep that would work. But you would have to run a cron to carry out the process at a set interval. If there is no change to the log file thats unnecessary.

Thanks for the tip :)

You could also change the location that Virtualmin configures Apache to log to for each domain, using the command-line API. The command would be like :

virtualmin modify-web --domain example.com --access-log /path/to/logs/example.log_access_log

How would that help? Isn't that the same as setting the log file path in the vhost template?

I was thinking it could be used to log directly to some kind of shared storage..

Ok, I'm pushing the logs to central location, in format log_name.server_ip using rsync, hopefully this will work.

Automatically closed -- issue fixed for 2 weeks with no activity.