Инструменты пользователя

Инструменты сайта


how-to:2gis

2gis

Автоматическая очистка кэша

Добавляем в cron:

echo '#!/bin/sh' | sudo tee /etc/cron.daily/2gis
echo 'find /var/cache/2gis/nginx/updates/ver3/download -atime +31 -type f -exec rm {} \;' | sudo tee -a /etc/cron.daily/2gis
sudo chmod +x /etc/cron.daily/2gis

или в crontab:

0 0 * * *	find /var/cache/2gis/nginx/updates/ver3/download -atime +31 -type f -exec rm {} \;

Ошибки

[warn] the «limit_zone» directive is deprecated, use the «limit_conn_zone» directive instead in /etc/nginx/conf.d/2gis-local-update-server.conf

Меняем строку:

limit_zone activity_threshold $threshold 10m;

на:

limit_conn_zone $threshold zone=activity_threshold:10m;
how-to/2gis.txt · Последнее изменение: 127.0.0.1