Nginx schreibt Protokolle in die alte Datei, nachdem Logrotate ausgeführt wurde

763
Cynial

Die logrotate-Konfiguration lautet:

cat /etc/logrotate.d/nginx:  /data/logs/nginx/*.log { daily dateext dateformat .%Y-%m-%d rotate 30 missingok create notifempty sharedscripts postrotate [ ! -f /usr/local/nginx/logs/nginx.pid ] || kill -USR1 `cat /usr/local/nginx/logs/nginx.pid` endscript } 

Nginx schreibt jedoch Protokolle in das access.log.2016-05-15, nicht in access.log

-rw-r--r-- 1 www root 0 May 14 03:46 access.log -rw-r--r-- 1 www root 47M May 16 10:26 access.log.2016-05-15 

Wie soll ich das beheben? Vielen Dank.

0
Ist die Datei vorhanden, auf die sich die Konfiguration stützt (`/usr/local/nginx/logs/nginx.pid`)? zagrimsan vor 7 Jahren 0
Ich habe es endlich geschafft, danke. Zu Ihrer Information: http://stackoverflow.com/questions/37245926/nginx-write-logsto-the-old-file-nach-running-logrotate Cynial vor 7 Jahren 0

0 Antworten auf die Frage