<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://agora.nasqueron.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sandrine</id>
	<title>Nasqueron Agora - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://agora.nasqueron.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sandrine"/>
	<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/Special:Contributions/Sandrine"/>
	<updated>2026-04-15T00:56:30Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.46.0-alpha</generator>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=Operations_grimoire/Logs&amp;diff=2148</id>
		<title>Operations grimoire/Logs</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=Operations_grimoire/Logs&amp;diff=2148"/>
		<updated>2025-11-22T13:01:43Z</updated>

		<summary type="html">&lt;p&gt;Sandrine: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Logrotate is a utility in Linux that manages log file rotation, archiving, and deletion automatically to prevent logs from consuming all disk space. The configuration is usually placed in /etc/logrotate.conf for global settings and in /etc/logrotate.d/ for application-specific log policies&lt;br /&gt;
&lt;br /&gt;
To configure logrotate for a specific service, create a file in /etc/logrotate.d/, for example /etc/logrotate.d/nginx, and add a block describing how the log files should be rotated:&lt;br /&gt;
&lt;br /&gt;
/var/log/nginx/*.log {&lt;br /&gt;
    daily&lt;br /&gt;
    rotate 7&lt;br /&gt;
    compress&lt;br /&gt;
    missingok&lt;br /&gt;
    notifempty&lt;br /&gt;
    create 640 root adm&lt;br /&gt;
    postrotate&lt;br /&gt;
        systemctl reload nginx &amp;gt; /dev/null&lt;br /&gt;
    endscript&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Logs are generally located in /var/log directory, but can also be in specialized systems (e.g. Docker)&lt;br /&gt;
&lt;br /&gt;
How to create a logrotate configuration (Linux)&lt;br /&gt;
Logrotate is a utility in Linux that manages log file rotation, archiving, and deletion automatically to prevent logs from consuming all disk space. The configuration is usually placed in /etc/logrotate.conf for global settings and in /etc/logrotate.d/ for application-specific log policies.​&lt;br /&gt;
&lt;br /&gt;
To configure logrotate for a specific service, create a file in /etc/logrotate.d/, for example /etc/logrotate.d/nginx, and add a block describing how the log files should be rotated:&lt;br /&gt;
&lt;br /&gt;
/var/log/nginx/*.log {&lt;br /&gt;
    daily&lt;br /&gt;
    rotate 7&lt;br /&gt;
    compress&lt;br /&gt;
    missingok&lt;br /&gt;
    notifempty&lt;br /&gt;
    create 640 root adm&lt;br /&gt;
    postrotate&lt;br /&gt;
        systemctl reload nginx &amp;gt; /dev/null&lt;br /&gt;
    endscript&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
To create a configuration for newsyslog under FreeBSD, you need to add or modify a line in the main file /etc/newsyslog.confor in an auxiliary configuration file, often specific to a service.​&lt;br /&gt;
&lt;br /&gt;
newsyslog is a utility on FreeBSD that manages log rotation, compression, and removal for system and application logs. Configuration is performed by adding or editing lines in /etc/newsyslog.conf or a custom file (often included with .conf extension in /etc/newsyslog.conf.d/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/var/log/www/*/*.log  root:web  640  90  *  @T00  JC  /var/run/nginx.pid  30&lt;br /&gt;
&lt;br /&gt;
If you&#039;re manipulating patterns with wildcards (like *), don&#039;t forget the option G. Otherwise, the system might create a literal file named ` *` or not process the files as expected.&lt;br /&gt;
&lt;br /&gt;
If you’re using wildcards, the G flag must be set to properly match multiple files. Without it, newsyslog may create a file literally named * or fail to manage the files as intended.&lt;br /&gt;
&lt;br /&gt;
For a complete explanation of each field, see the manual:https://man.freebsd.org/cgi/man.cgi?newsyslog.conf(5)&lt;br /&gt;
&lt;br /&gt;
When the &amp;quot;G&amp;quot; flag is omitted with newsyslog on FreeBSD and a pattern containing wildcards is used, as *in the path, several problems can occur:​&lt;br /&gt;
&lt;br /&gt;
Nothing happens: The rotation does not take place at all, because newsyslog does not understand that it must process all files matching the pattern (for example /var/log/nginx/*.log), and tries to open a file named literally with the asterisk.​&lt;br /&gt;
&lt;br /&gt;
Worse, creation of a “*” file : If we also use option C (auto creation), newsyslog can create a file called “*” in the target directory… this is of course unintended and can cause problems in log processing.​&lt;br /&gt;
&lt;br /&gt;
To avoid this, you should ALWAYS add the flag Gwhen specifying a pattern in the “log filename” field. The flag Ginstructs newsyslog to read the path as a glob shell pattern, and therefore to process all matching files in a batch — exactly as expected.​&lt;br /&gt;
&lt;br /&gt;
See the official documentation newsyslog.conf(5) for the definition and precautions relating to the &amp;quot;G&amp;quot; flag.&lt;br /&gt;
&lt;br /&gt;
After a log file is rotated (renamed and a new one created), many applications will not automatically start writing to the new file—they keep writing to the now-renamed (old) log file. To solve this, the application must be notified to reopen its log files. This is commonly done by sending a specific signal (not a kill -9, which forcefully terminates the process, but a well-defined signal the application knows how to handle, like SIGHUP or SIGUSR1).&lt;br /&gt;
&lt;br /&gt;
Similarly, with newsyslog (FreeBSD), it&#039;s possible to specify the path to the application&#039;s PID file and choose the appropriate signal so the daemon can close and reopen its log files after rotation.&lt;br /&gt;
&lt;br /&gt;
This mechanism ensures the application immediately starts writing to the new log file, guaranteeing complete and organized log capture&lt;/div&gt;</summary>
		<author><name>Sandrine</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=Operations_grimoire/Logs&amp;diff=2147</id>
		<title>Operations grimoire/Logs</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=Operations_grimoire/Logs&amp;diff=2147"/>
		<updated>2025-11-22T12:58:26Z</updated>

		<summary type="html">&lt;p&gt;Sandrine: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Logrotate is a utility in Linux that manages log file rotation, archiving, and deletion automatically to prevent logs from consuming all disk space. The configuration is usually placed in /etc/logrotate.conf for global settings and in /etc/logrotate.d/ for application-specific log policies&lt;br /&gt;
&lt;br /&gt;
To configure logrotate for a specific service, create a file in /etc/logrotate.d/, for example /etc/logrotate.d/nginx, and add a block describing how the log files should be rotated:&lt;br /&gt;
&lt;br /&gt;
/var/log/nginx/*.log {&lt;br /&gt;
    daily&lt;br /&gt;
    rotate 7&lt;br /&gt;
    compress&lt;br /&gt;
    missingok&lt;br /&gt;
    notifempty&lt;br /&gt;
    create 640 root adm&lt;br /&gt;
    postrotate&lt;br /&gt;
        systemctl reload nginx &amp;gt; /dev/null&lt;br /&gt;
    endscript&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Logs are generally located in /var/log directory, but can also be in specialized systems (e.g. Docker)&lt;br /&gt;
&lt;br /&gt;
How to create a logrotate configuration (Linux)&lt;br /&gt;
Logrotate is a utility in Linux that manages log file rotation, archiving, and deletion automatically to prevent logs from consuming all disk space. The configuration is usually placed in /etc/logrotate.conf for global settings and in /etc/logrotate.d/ for application-specific log policies.​&lt;br /&gt;
&lt;br /&gt;
To configure logrotate for a specific service, create a file in /etc/logrotate.d/, for example /etc/logrotate.d/nginx, and add a block describing how the log files should be rotated:&lt;br /&gt;
&lt;br /&gt;
/var/log/nginx/*.log {&lt;br /&gt;
    daily&lt;br /&gt;
    rotate 7&lt;br /&gt;
    compress&lt;br /&gt;
    missingok&lt;br /&gt;
    notifempty&lt;br /&gt;
    create 640 root adm&lt;br /&gt;
    postrotate&lt;br /&gt;
        systemctl reload nginx &amp;gt; /dev/null&lt;br /&gt;
    endscript&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
To create a configuration for newsyslog under FreeBSD, you need to add or modify a line in the main file /etc/newsyslog.confor in an auxiliary configuration file, often specific to a service.​&lt;br /&gt;
&lt;br /&gt;
newsyslog is a utility on FreeBSD that manages log rotation, compression, and removal for system and application logs. Configuration is performed by adding or editing lines in /etc/newsyslog.conf or a custom file (often included with .conf extension in /etc/newsyslog.conf.d/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/var/log/www/*/*.log  root:web  640  90  *  @T00  JC  /var/run/nginx.pid  30&lt;br /&gt;
&lt;br /&gt;
If you&#039;re manipulating patterns with wildcards (like *), don&#039;t forget the option G. Otherwise, the system might create a literal file named ` *` or not process the files as expected.&lt;br /&gt;
&lt;br /&gt;
If you’re using wildcards, the G flag must be set to properly match multiple files. Without it, newsyslog may create a file literally named * or fail to manage the files as intended.&lt;br /&gt;
&lt;br /&gt;
For a complete explanation of each field, see the manual:https://man.freebsd.org/cgi/man.cgi?newsyslog.conf(5)&lt;br /&gt;
&lt;br /&gt;
When the &amp;quot;G&amp;quot; flag is omitted with newsyslog on FreeBSD and a pattern containing wildcards is used, as *in the path, several problems can occur:​&lt;br /&gt;
&lt;br /&gt;
Nothing happens: The rotation does not take place at all, because newsyslog does not understand that it must process all files matching the pattern (for example /var/log/nginx/*.log), and tries to open a file named literally with the asterisk.​&lt;br /&gt;
&lt;br /&gt;
Worse, creation of a “*” file : If we also use option C (auto creation), newsyslog can create a file called “*” in the target directory… this is of course unintended and can cause problems in log processing.​&lt;br /&gt;
&lt;br /&gt;
To avoid this, you should ALWAYS add the flag Gwhen specifying a pattern in the “log filename” field. The flag Ginstructs newsyslog to read the path as a glob shell pattern, and therefore to process all matching files in a batch — exactly as expected.​&lt;br /&gt;
&lt;br /&gt;
See the official documentation newsyslog.conf(5) for the definition and precautions relating to the &amp;quot;G&amp;quot; flag.&lt;/div&gt;</summary>
		<author><name>Sandrine</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=Operations_grimoire/Logs&amp;diff=2146</id>
		<title>Operations grimoire/Logs</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=Operations_grimoire/Logs&amp;diff=2146"/>
		<updated>2025-11-22T12:41:34Z</updated>

		<summary type="html">&lt;p&gt;Sandrine: /* Log rotation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Logs are generally located in /var/log directory, but can also be in specialized systems (e.g. Docker)&lt;br /&gt;
&lt;br /&gt;
How to create a logrotate configuration (Linux)&lt;br /&gt;
Logrotate is a utility in Linux that manages log file rotation, archiving, and deletion automatically to prevent logs from consuming all disk space. The configuration is usually placed in /etc/logrotate.conf for global settings and in /etc/logrotate.d/ for application-specific log policies.​&lt;br /&gt;
&lt;br /&gt;
To configure logrotate for a specific service, create a file in /etc/logrotate.d/, for example /etc/logrotate.d/nginx, and add a block describing how the log files should be rotated:&lt;br /&gt;
&lt;br /&gt;
/var/log/nginx/*.log {&lt;br /&gt;
    daily&lt;br /&gt;
    rotate 7&lt;br /&gt;
    compress&lt;br /&gt;
    missingok&lt;br /&gt;
    notifempty&lt;br /&gt;
    create 640 root adm&lt;br /&gt;
    postrotate&lt;br /&gt;
        systemctl reload nginx &amp;gt; /dev/null&lt;br /&gt;
    endscript&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
How the rotation works:&lt;br /&gt;
When logrotate runs (automatically via cron or manually), it checks each log file per the configuration, archives old logs, creates new ones, and triggers the specified post-rotation actions.&lt;br /&gt;
&lt;br /&gt;
For reference, see the full documentation:&lt;br /&gt;
&lt;br /&gt;
https://wiki.archlinux.org/title/Logrotate&lt;br /&gt;
&lt;br /&gt;
== Log rotation ==&lt;br /&gt;
=== Logrotate (Linux) ===&lt;br /&gt;
&lt;br /&gt;
To create a logrotate configuration under Linux, you simply need to create (or modify) a file in the directory /etc/logrotate.d/. Each file in this folder contains one or more sections, each describing the rotation rules for one or more log files.​&lt;br /&gt;
&lt;br /&gt;
/var/log/nginx/*.log {&lt;br /&gt;
    daily&lt;br /&gt;
    rotate 7&lt;br /&gt;
    compress&lt;br /&gt;
    missingok&lt;br /&gt;
    notifempty&lt;br /&gt;
    create 640 root adm&lt;br /&gt;
    postrotate&lt;br /&gt;
        systemctl reload nginx &amp;gt; /dev/null&lt;br /&gt;
    endscript&lt;br /&gt;
}&lt;br /&gt;
For more details, see: https://linux.die.net/man/8/logrotate&lt;/div&gt;</summary>
		<author><name>Sandrine</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=Operations_grimoire/Logs&amp;diff=2145</id>
		<title>Operations grimoire/Logs</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=Operations_grimoire/Logs&amp;diff=2145"/>
		<updated>2025-11-22T12:37:10Z</updated>

		<summary type="html">&lt;p&gt;Sandrine: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Logs are generally located in /var/log directory, but can also be in specialized systems (e.g. Docker)&lt;br /&gt;
&lt;br /&gt;
How to create a logrotate configuration (Linux)&lt;br /&gt;
Logrotate is a utility in Linux that manages log file rotation, archiving, and deletion automatically to prevent logs from consuming all disk space. The configuration is usually placed in /etc/logrotate.conf for global settings and in /etc/logrotate.d/ for application-specific log policies.​&lt;br /&gt;
&lt;br /&gt;
To configure logrotate for a specific service, create a file in /etc/logrotate.d/, for example /etc/logrotate.d/nginx, and add a block describing how the log files should be rotated:&lt;br /&gt;
&lt;br /&gt;
/var/log/nginx/*.log {&lt;br /&gt;
    daily&lt;br /&gt;
    rotate 7&lt;br /&gt;
    compress&lt;br /&gt;
    missingok&lt;br /&gt;
    notifempty&lt;br /&gt;
    create 640 root adm&lt;br /&gt;
    postrotate&lt;br /&gt;
        systemctl reload nginx &amp;gt; /dev/null&lt;br /&gt;
    endscript&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
How the rotation works:&lt;br /&gt;
When logrotate runs (automatically via cron or manually), it checks each log file per the configuration, archives old logs, creates new ones, and triggers the specified post-rotation actions.&lt;br /&gt;
&lt;br /&gt;
For reference, see the full documentation:&lt;br /&gt;
&lt;br /&gt;
https://wiki.archlinux.org/title/Logrotate&lt;br /&gt;
&lt;br /&gt;
== Log rotation ==&lt;br /&gt;
=== Logrotate (Linux) ===&lt;/div&gt;</summary>
		<author><name>Sandrine</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=Operations_grimoire/Logs&amp;diff=2144</id>
		<title>Operations grimoire/Logs</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=Operations_grimoire/Logs&amp;diff=2144"/>
		<updated>2025-11-22T12:35:21Z</updated>

		<summary type="html">&lt;p&gt;Sandrine: /* Newsyslog */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Logs are generally located in /var/log directory, but can also be in specialized systems (e.g. Docker)&lt;br /&gt;
&lt;br /&gt;
How to create a logrotate configuration (Linux)&lt;br /&gt;
Logrotate is a utility in Linux that manages log file rotation, archiving, and deletion automatically to prevent logs from consuming all disk space. The configuration is usually placed in /etc/logrotate.conf for global settings and in /etc/logrotate.d/ for application-specific log policies.​&lt;br /&gt;
&lt;br /&gt;
To configure logrotate for a specific service, create a file in /etc/logrotate.d/, for example /etc/logrotate.d/nginx, and add a block describing how the log files should be rotated:&lt;br /&gt;
&lt;br /&gt;
/var/log/nginx/*.log {&lt;br /&gt;
    daily&lt;br /&gt;
    rotate 7&lt;br /&gt;
    compress&lt;br /&gt;
    missingok&lt;br /&gt;
    notifempty&lt;br /&gt;
    create 640 root adm&lt;br /&gt;
    postrotate&lt;br /&gt;
        systemctl reload nginx &amp;gt; /dev/null&lt;br /&gt;
    endscript&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
How the rotation works:&lt;br /&gt;
When logrotate runs (automatically via cron or manually), it checks each log file per the configuration, archives old logs, creates new ones, and triggers the specified post-rotation actions.&lt;br /&gt;
&lt;br /&gt;
For reference, see the full documentation:&lt;br /&gt;
&lt;br /&gt;
https://wiki.archlinux.org/title/Logrotate&lt;br /&gt;
&lt;br /&gt;
== Log rotation ==&lt;br /&gt;
=== Logrotate (Linux) ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Newsyslog ===&lt;br /&gt;
&lt;br /&gt;
To create a configuration for newsyslog under FreeBSD, you need to add or modify a line in the main file /etc/newsyslog.confor in an auxiliary configuration file, often specific to a service.​&lt;br /&gt;
&lt;br /&gt;
/var/log/www/*/*.log  root:web  640  90  *  @T00  JC  /var/run/nginx.pid  30&lt;br /&gt;
&lt;br /&gt;
If you&#039;re manipulating patterns with wildcards (like *), don&#039;t forget the option G. Otherwise, the system might create a literal file named ` *` or not process the files as expected.&lt;br /&gt;
&lt;br /&gt;
For a field-by-field explanation, see the man page:&lt;br /&gt;
&lt;br /&gt;
https://man.freebsd.org/cgi/man.cgi?newsyslog.conf(5)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Sandrine</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=Operations_grimoire/Logs&amp;diff=2143</id>
		<title>Operations grimoire/Logs</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=Operations_grimoire/Logs&amp;diff=2143"/>
		<updated>2025-11-22T12:31:24Z</updated>

		<summary type="html">&lt;p&gt;Sandrine: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Logs are generally located in /var/log directory, but can also be in specialized systems (e.g. Docker)&lt;br /&gt;
&lt;br /&gt;
How to create a logrotate configuration (Linux)&lt;br /&gt;
Logrotate is a utility in Linux that manages log file rotation, archiving, and deletion automatically to prevent logs from consuming all disk space. The configuration is usually placed in /etc/logrotate.conf for global settings and in /etc/logrotate.d/ for application-specific log policies.​&lt;br /&gt;
&lt;br /&gt;
To configure logrotate for a specific service, create a file in /etc/logrotate.d/, for example /etc/logrotate.d/nginx, and add a block describing how the log files should be rotated:&lt;br /&gt;
&lt;br /&gt;
/var/log/nginx/*.log {&lt;br /&gt;
    daily&lt;br /&gt;
    rotate 7&lt;br /&gt;
    compress&lt;br /&gt;
    missingok&lt;br /&gt;
    notifempty&lt;br /&gt;
    create 640 root adm&lt;br /&gt;
    postrotate&lt;br /&gt;
        systemctl reload nginx &amp;gt; /dev/null&lt;br /&gt;
    endscript&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
How the rotation works:&lt;br /&gt;
When logrotate runs (automatically via cron or manually), it checks each log file per the configuration, archives old logs, creates new ones, and triggers the specified post-rotation actions.&lt;br /&gt;
&lt;br /&gt;
For reference, see the full documentation:&lt;br /&gt;
&lt;br /&gt;
https://wiki.archlinux.org/title/Logrotate&lt;br /&gt;
&lt;br /&gt;
== Log rotation ==&lt;br /&gt;
=== Logrotate (Linux) ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Newsyslog ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Sandrine</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=Operations_grimoire/Logs&amp;diff=2142</id>
		<title>Operations grimoire/Logs</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=Operations_grimoire/Logs&amp;diff=2142"/>
		<updated>2025-11-22T12:30:24Z</updated>

		<summary type="html">&lt;p&gt;Sandrine: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sandrine</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=Operations_grimoire/Logs&amp;diff=2141</id>
		<title>Operations grimoire/Logs</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=Operations_grimoire/Logs&amp;diff=2141"/>
		<updated>2025-11-22T12:29:17Z</updated>

		<summary type="html">&lt;p&gt;Sandrine: /* Web logs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Logs are generally located in /var/log directory, but can also be in specialized systems (e.g. Docker)&lt;br /&gt;
&lt;br /&gt;
How to create a logrotate configuration (Linux)&lt;br /&gt;
Logrotate is a utility in Linux that manages log file rotation, archiving, and deletion automatically to prevent logs from consuming all disk space. The configuration is usually placed in /etc/logrotate.conf for global settings and in /etc/logrotate.d/ for application-specific log policies.​&lt;br /&gt;
&lt;br /&gt;
To configure logrotate for a specific service, create a file in /etc/logrotate.d/, for example /etc/logrotate.d/nginx, and add a block describing how the log files should be rotated:&lt;br /&gt;
&lt;br /&gt;
/var/log/nginx/*.log {&lt;br /&gt;
    daily&lt;br /&gt;
    rotate 7&lt;br /&gt;
    compress&lt;br /&gt;
    missingok&lt;br /&gt;
    notifempty&lt;br /&gt;
    create 640 root adm&lt;br /&gt;
    postrotate&lt;br /&gt;
        systemctl reload nginx &amp;gt; /dev/null&lt;br /&gt;
    endscript&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
How the rotation works:&lt;br /&gt;
When logrotate runs (automatically via cron or manually), it checks each log file per the configuration, archives old logs, creates new ones, and triggers the specified post-rotation actions.&lt;br /&gt;
&lt;br /&gt;
For reference, see the full documentation:&lt;br /&gt;
&lt;br /&gt;
https://wiki.archlinux.org/title/Logrotate&lt;br /&gt;
&lt;br /&gt;
== Log rotation ==&lt;br /&gt;
=== Logrotate (Linux) ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Newsyslog ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Sandrine</name></author>
	</entry>
</feed>