日志小建议
网站打开了日志,担心日志文件会用尽硬盘,建议日志文件按七天滚动最大50M rotatelogs CustomLog "|/usr/sbin/rotatelogs /home/wwwlog/accesslog 5M" common Incorrect number of argumentsUsage: /usr/local/apache/bin/rotatelogs [-l] [-f] <logfile> {<rotation time in seconds>|<rotation size in megabytes>}
Add this:
TransferLog "|/usr/local/apache/bin/rotatelogs /some/where 86400"
or
TransferLog "|/usr/local/apache/bin/rotatelogs /some/where 5M"
to httpd.conf. The generated name will be /some/where.nnnn where nnnn is the
system time at which the log nominally starts (N.B. if using a rotation time,
the time will always be a multiple of the rotation time, so you can synchronize
cron scripts with it). At the end of each rotation time or when the file size
is reached a new log is started.
页:
[1]