This issue has come up this week.
This is the simple line which tells nginx to log to a file,
access_log /var/log/nginx/infotrack_access.log;
But this is misbehaving.
This file(/var/log/nginx/infotrack_access.log
) is empty now, and all the logs are being written to /var/log/nginx/infotrack_access.log.1
and not /var/log/nginx/infotrack_access.log
.
Why is this happening ?
EDIT - This happened after I added this line to the file,
access_log syslog:server=localhost:514 rsyslog;
Below is the nginx.conf
file,
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}