informatique:applications:epure_moi_ces_logs_que_je_ne_serai_voir_logrotate

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
informatique:applications:epure_moi_ces_logs_que_je_ne_serai_voir_logrotate [2023/02/10 23:48] – supprimée - modification externe (Unknown date) informatique:applications:epure_moi_ces_logs_que_je_ne_serai_voir_logrotate [2023/02/10 23:48] (Version actuelle) – ↷ Page déplacée de informatique:linux:applications:epure_moi_ces_logs_que_je_ne_serai_voir_logrotate à informatique:applications:epure_moi_ces_logs_que_je_ne_serai_voir_logrotate Cédric ABONNEL
Ligne 1: Ligne 1:
 +====== logrotate, épure-moi ces logs que je ne serai voir ======
 +
 +
 +===== Exemple pour Apache2 =====
 +
 +
 +<code>
 +    /home/www-data/logs/apache2/*.log {
 +            daily
 +            missingok
 +            rotate 31
 +            notifempty
 +            create 640 root
 +            sharedscripts
 +            postrotate
 +                    if /etc/init.d/apache2 status > /dev/null ; then \
 +                        /etc/init.d/apache2 reload > /dev/null; \
 +                    fi;
 +            endscript
 +            prerotate
 +                    if [ -d /etc/logrotate.d/www-data-prerotate ]; then \
 +                            run-parts /etc/logrotate.d/www-data-prerotate; \
 +                    fi; \
 +            endscript
 +    }
 +     
 +    /home/www-data/www/storage/abonnel.fr/cloud/data/nextcloud.log {
 +            su www-data www-data
 +            daily
 +            missingok
 +            rotate 2
 +            notifempty
 +            create 640 www-data
 +            sharedscripts
 +    }
 +     
 +    /home/www-data/logs/load/load.log {
 +            su www-data www-data
 +            daily
 +            missingok
 +            rotate 3
 +            notifempty
 +            create 640 www-data
 +            sharedscripts
 +    }
 +     
 +    /home/www-data/logs/certbot/certbot.log {
 +            su www-data www-data
 +            daily
 +            missingok
 +            rotate 30
 +            notifempty
 +            create 640 www-data
 +            sharedscripts
 +    }
 +</code>