CharlyBr on Jul 30th, 2008Follow your debian server updates by email with apticron
apticron is a shell script that send you an email report when new packages are available on your debian server.
Install apticron
As root, do:
apt-get install apticron
apticron configuration via /etc/apticron/apticron.conf
To receive reports on your email change the EMAIL variable in the configuration file. By default, reports are sent to the root user.
EMAIL=”root” -> EMAIL=”you@domain.com”
Reports received
Now apticron will [...]
CharlyBr on Jul 22nd, 2008Maintenance mode (HTTP 503) with lighttpd and PHP
When you put your website in maintenance mode, it’s a good idea to return a HTTP 503 error code to the client.
This code indicates that “the server is currently unable to handle the request due to a temporary overloading or maintenance of the server”.
The 503 code is used to avoid crawlers or [...]
CharlyBr on Jul 17th, 2008Rotate 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 log rotation:
-rw-r–r– 1 root wheel 967 Jul [...]