July 2018
Beginner
264 pages
8h 9m
English
Now, we will configure a web server. This puts information like access.log and error.log into the /var/log/example-app. It will act as a data user or group.
To add some configuration to /etc/logrotate.d/, first open up a new file there:
$ sudo nano /etc/logrotate.d/example-app
Write the following code in example-app:
/var/log/example-app/*.log { daily missingok rotate 14 compress notifempty create 0640 www-data www-data sharedscripts postrotate systemctl reload example-app endscript}Some of the new configuration directives in this file are as follows:
Read now
Unlock full access