{"id":559,"date":"2026-03-04T09:46:46","date_gmt":"2026-03-04T08:46:46","guid":{"rendered":"https:\/\/www.papadia.org\/?p=559"},"modified":"2026-03-04T09:47:43","modified_gmt":"2026-03-04T08:47:43","slug":"logrotate","status":"publish","type":"post","link":"https:\/\/www.papadia.org\/?p=559","title":{"rendered":"logrotate"},"content":{"rendered":"\n<h2 class=\"wp-block-heading has-medium-font-size\">Configurare la rotazione dei log per altri servizi<\/h2>\n\n\n\n<p>Portarsi nella cartella seguente<\/p>\n\n\n\n<p>\/etc\/logrotate.d\/<\/p>\n\n\n\n<p>In questa cartella ci sono diversi file, \u00e8 conveniente copiarne un file di configurazione esistente per poi modificarle secondo le nostre esigenze. Per esempio possiamo copiare il file &#8220;apache&#8221; che ha il seguente contenuto:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"637\" height=\"809\" src=\"https:\/\/www.papadia.org\/wp-content\/uploads\/2026\/03\/image.png\" alt=\"\" class=\"wp-image-560\" srcset=\"https:\/\/www.papadia.org\/wp-content\/uploads\/2026\/03\/image.png 637w, https:\/\/www.papadia.org\/wp-content\/uploads\/2026\/03\/image-236x300.png 236w\" sizes=\"auto, (max-width: 637px) 100vw, 637px\" \/><\/figure>\n\n\n\n<p>Sotto allo script potete leggere le direttive pi\u00f9 comuni.<\/p>\n\n\n\n<p>Nella copia che abbiamo fatto dobbiamo modificare innanzitutto il path inserendo il path dove vengono scritti i log del nostro servizio; di seguito quello che c&#8217;\u00e8 scritto nel file chiamato <strong>apache<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>path del log: \/var\/log\/apache2\/*.log<\/code><\/pre>\n\n\n\n<p>Tutto il resto possiamo anche lasciarlo se ci va bene.<\/p>\n\n\n\n<p>Per fare un test possiamo usare il comando seguente (sostituire apache2 con il nostro file)<\/p>\n\n\n\n<p>logrotate -f \/etc\/logrotate.d\/apache2<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Configurare la rotazione dei log per altri servizi Portarsi nella cartella seguente \/etc\/logrotate.d\/ In questa cartella ci sono diversi file,<\/p>\n","protected":false},"author":2,"featured_media":564,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[5,10,6],"tags":[],"class_list":["post-559","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-latest","category-linux","category-primo-piano"],"_links":{"self":[{"href":"https:\/\/www.papadia.org\/index.php?rest_route=\/wp\/v2\/posts\/559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.papadia.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.papadia.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.papadia.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.papadia.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=559"}],"version-history":[{"count":9,"href":"https:\/\/www.papadia.org\/index.php?rest_route=\/wp\/v2\/posts\/559\/revisions"}],"predecessor-version":[{"id":571,"href":"https:\/\/www.papadia.org\/index.php?rest_route=\/wp\/v2\/posts\/559\/revisions\/571"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.papadia.org\/index.php?rest_route=\/wp\/v2\/media\/564"}],"wp:attachment":[{"href":"https:\/\/www.papadia.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.papadia.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=559"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.papadia.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}