My nginx tmp/nginx_client directory is not emptying automatically with crontab

Το πρόβλημα

Do you want to use nginx automatical crontab command to clear your /tmp/nginx_client/ folder,

Η λύση

but that command is not working causing the nginx to full your tmp folder,

First check via SSH that you have added the command line at crontab -e

You need to have added this:

0 */1 * * * /usr/sbin/tmpwatch -am 1 /tmp/nginx_client

You can always change the frequency of the cron, but the above is suggested by nginx

So if its listed there, then you are missing tmpwatch

Lets check if this is true:

Type in SSH: /usr/sbin/tmpwatch -am 1 /tmp/nginx_client

Κώδικας
If it states that the directory does not exist or not found then you need to add tmpwath

So you need to install it, in order ngnix to work smoothly

So in SSH again type:  yum install tmpwatch

And then to check if its working just type: /usr/sbin/tmpwatch -am 1 /tmp/nginx_client

Nginx will be working ok and no need to manually empty the /tmp/nginx_client folder again.

Σας βοήθησε αυτή η λύση;

← Όλες οι λύσεις