« Using Perl and MySQL | Main | Spam Email »
May 09, 2005
Log Files
I deleted the log files of Postfix and Apache manually, these files weren't re-created even after I restarted Postfix and Syslogd, and it ended with a system reboot. I need to find a good way to rerotate Apache log files.
Update: Apache will create the new log files after restarting, a graceful restart is perferred.
# /usr/local/sbin/apachectl graceful
Check out Apache Log Rotation for more info.
Category : FreeBSD General
Posted by FreeBSD Newbie at May 9, 2005 07:21 PM
Comments
I use the rotatelog program, which works great.
Example:
CustomLog "|/usr/local/sbin/rotatelogs /path/to/log/logfilename 86400 -240" combined
This will make a new log each day. The -240 is an offset for your timezone.
Posted by yegg at May 16, 2005 07:20 PM
Many thanks for your info, yegg, your suggestions are very helpful. I seem to find the reason of the spams mails, the mail server past open relay test on a website, but it seems I can send an email according to your telnet example with the email address www@myhost.com. I need more work and will post the result later.
Posted by FreeBSD Newbie at May 16, 2005 07:58 PM
