mardi 4 août 2015

UWSGI log rotation

I am using uwsgi 2.0.10 version.

/etc/init/uwsgi.conf :

exec /home/testuser/virtual_environments/app/bin/uwsgi \
--master \
--processes 4 \
--die-on-term \
--uid testuser \
--home /home/testuser/virtual_environments/app \
--pythonpath /home/testuser/app \
--socket /tmp/uwsgi.sock \
--chmod-socket 660 \
--no-site \
--vhost \
--logto /var/log/uwsgi/uwsgi.log

/etc/logrotate.d/uwsgi:

/var/log/uwsgi/uwsgi.log {
    rotate 10
    daily
    compress
    missingok
    create 640 root root
    postrotate
        initctl restart uwsgi >/dev/null 2>&1
    endscript

But when i restart the server throw the message Unknown instance: so i need log rotation for daily log file. please correct if any modification in uwsgi.conf file. please help me.

Aucun commentaire:

Enregistrer un commentaire