Submitted by mbakop on Mon, 11/28/2011 - 14:47
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
Submitted by JamieCameron on Mon, 11/28/2011 - 14:53 Comment #1
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..
Submitted by mbakop on Mon, 11/28/2011 - 15:21 Comment #2
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 :)
Submitted by JamieCameron on Mon, 11/28/2011 - 15:38 Comment #3
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
Submitted by mbakop on Mon, 11/28/2011 - 15:43 Comment #4
How would that help? Isn't that the same as setting the log file path in the vhost template?
Submitted by JamieCameron on Mon, 11/28/2011 - 15:57 Comment #5
I was thinking it could be used to log directly to some kind of shared storage..
Submitted by mbakop on Tue, 11/29/2011 - 10:00 Comment #6
Ok, I'm pushing the logs to central location, in format log_name.server_ip using rsync, hopefully this will work.
Submitted by Issues on Tue, 12/13/2011 - 10:18 Comment #7
Automatically closed -- issue fixed for 2 weeks with no activity.