Allow disable access log
This commit is contained in:
parent
b08e60fe71
commit
abb3293151
|
@ -7,8 +7,13 @@ server {
|
|||
root {{ item.root|default('/var/www/html') }};
|
||||
index {{ item.index|default('index.html index.htm')}};
|
||||
|
||||
access_log /var/log/nginx/{{ item.server_name[0] }}.access.log combined buffer=20m flush=5m;
|
||||
error_log /var/log/nginx/{{ item.server_name[0] }}.error.log warn;
|
||||
{% if disable_acces_log is defined %}
|
||||
access_log off;
|
||||
error_log off;
|
||||
{% else %}
|
||||
access_log /var/log/nginx/{{ item.server_name[0] }}.access.log combined; # buffer=20m flush=5m;
|
||||
error_log /var/log/nginx/{{ item.server_name[0] }}.error.log;
|
||||
{% endif %}
|
||||
|
||||
{% include 'partials/ssl.j2' %}
|
||||
|
||||
|
|
|
@ -7,8 +7,13 @@ server {
|
|||
root {{ item.root|default('/var/www/html') }};
|
||||
index {{ item.index|default('index.html index.htm')}};
|
||||
|
||||
access_log /var/log/nginx/{{ item.server_name[0] }}.access.log combined buffer=20m flush=5m;
|
||||
error_log /var/log/nginx/{{ item.server_name[0] }}.error.log warn;
|
||||
{% if disable_acces_log is defined %}
|
||||
access_log off;
|
||||
error_log off;
|
||||
{% else %}
|
||||
access_log /var/log/nginx/{{ item.server_name[0] }}.access.log combined; # buffer=20m flush=5m;
|
||||
error_log /var/log/nginx/{{ item.server_name[0] }}.error.log;
|
||||
{% endif %}
|
||||
|
||||
{% include 'partials/ssl.j2' %}
|
||||
|
||||
|
|
|
@ -4,8 +4,13 @@
|
|||
server {
|
||||
{% include 'partials/header.j2' %}
|
||||
|
||||
{% if disable_acces_log is defined %}
|
||||
access_log off;
|
||||
error_log off;
|
||||
{% else %}
|
||||
access_log /var/log/nginx/{{ item.server_name[0] }}.access.log combined; # buffer=20m flush=5m;
|
||||
error_log /var/log/nginx/{{ item.server_name[0] }}.error.log;
|
||||
{% endif %}
|
||||
|
||||
include /etc/nginx/conf.d/proxy.conf;
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
{% include 'partials/upstream.j2' %}
|
||||
server {
|
||||
{% include 'partials/header.j2' %}
|
||||
access_log /dev/null;
|
||||
error_log /dev/null;
|
||||
access_log off;
|
||||
error_log off;
|
||||
|
||||
{% include 'partials/ssl.j2' %}
|
||||
|
||||
|
|
Loading…
Reference in New Issue