Bài đăng

Đang hiển thị bài đăng từ tháng 6 22, 2008

Apache Log Rotation

On even a moderately busy server, the quantity of information stored in the log files is very large. The access log file typically grows 1 MB or more per 10,000 requests. It will consequently be necessary to periodically rotate the log files by moving or deleting the existing logs. This cannot be done while the server is running, because Apache will continue writing to the old log file as long as it holds the file open. Instead, the server must be restarted after the log files are moved or deleted so that it will open new log files. in httpd.conf, add: CustomLog "|/usr/local/apache/bin/rotatelogs /usr/local/apache/logs/access_log.%Y%m%d 86400 -360" common (changing the path as needed...) where the number 86400 is seconds to rotation (86400 is 24 hours) and -360 is minutes offset from UTC 0 (-360 is for US Central) and comment out any other line beginning with 'CustomLog' this will give you logs, rotated daily, named something like: access_log.20061101 access_log.20061

Play next movie after FLV movie is complete

if stream is your NetStream class, at some point you need to hook up an onStatus event handler. Code: ****************************************************************** stream.notify = this; stream.onStatus = function( s ) { notify.onStatus( s ); }; ****************************************************************** this being our video "component", the class that contained the NetStream object. Then our onStatus handler was: Code: ****************************************************************** function onStatus( status ) { switch( status.code ) { case "NetStream.Buffer.Empty": onEmpty(); break; case "NetStream.Buffer.Full": onFull(); break; case "NetStream.Buffer.Flush": onFlush(); break; case "NetStream.Play.Start": onStart(); break; case "NetStream.Play.Stop": onStop(); break; case "