Does the apache server in colbalt rack generate a new log file every month? What is the location(absolute path) of the log file on the web server?
The size of the log file grows very fast, should I delete it?
Originally posted by wht
Does the apache server in colbalt rack generate a new log file every month? What is the location(absolute path) of the log file on the web server?
The size of the log file grows very fast, should I delete it?
No, the Cobalt server generates new logfiles every day.
The location of the global logfile is:
/var/log/httpd/access
You do not need to delete it. It will automatically be logrotated once a day.
--
Jens Kristian Søgaard, Mermaid Consulting I/S,
jens@mermaidconsulting.dk,
http://www.mermaidconsulting.dk/
http://www.raqsupport.net/
No, the Cobalt server generates new logfiles every day
This is good, but how come when I download the log file from the "site usage" panel at the administration page, the log files has records for several days? I think it is for the current month, right?
You do not need to delete it. It will automatically be logrotated once a day.
what do you mean by "logrotated"? are you saying that the server will delete the log file for the previous day?
What I need is a monthly log file, and a daily log file, so that I can analyze daily/monthly hits.
Originally posted by wht
This is good, but how come when I download the log file from the "site usage" panel at the administration page, the log files has records for several days? I think it is for the current month, right?
That's just because you do not get that much traffic. If you logfiles are sufficiently small, they will not be logrotated.
what do you mean by "logrotated"? are you saying that the server will delete the log file for the previous day?
Well, first it will compress it - and save it with .1 appended to the filename. Then the next day, it will delete it.
What I need is a monthly log file, and a daily log file, so that I can analyze daily/monthly hits.
Install (or have installed) a program like Webalizer that can do incremental processing - that way you do not have to save old logfiles (they can be huge).
--
Jens Kristian Søgaard, Mermaid Consulting I/S,
jens@mermaidconsulting.dk,
http://www.mermaidconsulting.com/
You can change the behavior of logrotate using the logrotate.conf file. I have my server save four weeks of logs for security purposes. Logrotate.conf is located in /etc
huck, that's great. I will change the configure file too...
this is my 'logrotate.conf' file, what should I change in order to make it rotate the log on a monthly basis
# see "man logrotate" for details
# rotate log files weekly
weekly
# keep 4 weeks worth of backlogs
rotate 1
# send errors to root
errors root
# create new (empty) log files after rotating old ones
create
# uncomment this if you want your log files compressed
compress
# Put in a generic size limit so things don't go wild
size 1M
# RPM packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own lastlog or wtmp -- we'll rotate them here
/var/log/wtmp {
monthly
size 2M
create 0664 root root
rotate 1
}
# system-specific logs may be configured here