Nginx: Temporary Files Cleanup Automatically

nginx

I installed Nginx Admin (v4.5 Stable) in plugins of WHM. i feel it's making load on server when there a lot of files generated in /tmp/nginx_client/ directory. i want some cronjob which run Temporary Files Cleanup operation automatically. Or is there any predefined action to do this ? Any help would be much appreciated. Thanks

Best Answer

open cron file:

crontab -u root -e

write down the following lines

#flush nginx tmp files.
# 360 = 6hrs
*/59 * * * * find /tmp/nginx_client/* -mmin +360 -delete

also tmpwatch can help you.

Related Topic