I was surprised when I saw the length of the Chrome user agent string last week: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.X.Y.Z Safari/525.13 And in our logs: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.29 Safari/525.13 a user agent string of 119 characters. It looks …
Logs
Using Logcheck
Logcheck is a tool to parse system logs and send summaries by email. It filters out logs with a regular expressions database to suppress common/normal entries. Are you reading / checking your log files? Too many servers? logcheck will help you in this task and eliminates the noise. Installing on Debian # apt-get install logcheck …
Rotate Nginx log files under FreeBSD
To rotate your nginx log files, you can use the log file handler provided by FreeBSD: newsyslog. Configuring /etc/newsyslog.conf /var/log/nginx-access.log 644 7 1024 * JC /var/run/nginx.pid /var/log/nginx-error.log 644 7 1024 * JC /var/run/nginx.pid Before log rotation: -rw-r–r– 1 root wheel 104278002 Jul 16 11:35 nginx-access.log -rw-r–r– 1 root wheel 1509531 Jul 16 11:17 nginx-error.log After …
Rotate Apache logs with Cronolog
Cronolog is log rotation program which gives you a lot of options to template the log destination files. The common use is to split logs by year / month / day. Here is how to configure Apache to send log entries to cronolog : CustomLog “|/usr/sbin/cronolog /home/log/apache2/%Y-%m-%d_domain.com_access.log” combined This will create a log file named …