...
| Code Block |
|---|
server {
listen 80;
server_name goaccess.example.com;
root /var/www/html/;
location / {
index index.html;
}
}
|
switch log rotation to monthly so page contain more data (if size of logs allows that)
| Code Block |
|---|
vi /etc/logrotate.d/nginx |
| Code Block | ||
|---|---|---|
| ||
/var/log/nginx/*.log {
monthly
missingok
rotate 3
notifempty
create 640 nginx adm
sharedscripts
postrotate
if [ -f /var/run/nginx.pid ]; then
kill -USR1 `cat /var/run/nginx.pid`
fi
endscript
} |
