feat: rework logging and rotation rules
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
user {{ nginx_user }};
|
||||
worker_processes {{ nginx_worker_processes }};
|
||||
{% if nginx_log_backend == 'journald' %}
|
||||
error_log syslog:server=unix:/dev/log,nohostname;
|
||||
{% else %}
|
||||
error_log /var/log/nginx/error.log;
|
||||
{% endif %}
|
||||
pid /run/nginx.pid;
|
||||
|
||||
include /usr/share/nginx/modules/*.conf;
|
||||
@@ -14,7 +18,11 @@ http {
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
{% if nginx_log_backend == 'journald' %}
|
||||
access_log syslog:server=unix:/dev/log,nohostname main;
|
||||
{% else %}
|
||||
access_log /var/log/nginx/access.log main;
|
||||
{% endif %}
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
|
||||
Reference in New Issue
Block a user