Pages

Bài đăng phổ biến

Saturday, June 27, 2015

Logrotate with nginx

/path_to_accesslog/access.log {
    missingok
    notifempty
    size 100000k
    daily
    create 0644 www root
    postrotate
[ ! -f /etc/nginx/logs/nginx.pid ] || kill -USR1 `cat /etc/nginx/logs/nginx.pid`
    endscript
}

Explain:

missingok :  do not output error if logfile is missing
notifempty : do not rotate if logfile is empty
size             : Log file is rotated if it is  bigger than 100000KB
daily            : daily rotation
create 0644 www root : create new logfile with permission 644 where owner is www and group is root user.
postrotate
[ ! -f /etc/nginx/logs/nginx.pid ] || kill -USR1 `cat /etc/nginx/logs/nginx.pid`
    endscript

=> tells nginx reload the log files .

Finish!!!

Nguyen Si Nhan

Sunday, November 10, 2013

Install/Setup windows from Usb


1. Download and extract WinSetupFromUSB and run it.
2. Mark checkbox corresponding to Windows 2000/XP/2003 Setup and locate installation source or CD that contains I386 or AMD64 folders.
3. Now click on Go button to start copying installation source to USB stick and finalizing all sort of things.



Once its Done! you can restart your PC and boot from USB stick. You need to follow 3-Steps installation, viz:
    1. Text mode setup
    2. GUI mode setup
    3. Start Windows for first time