mirror of
https://github.com/HanXHX/ansible-nginx.git
synced 2026-02-24 09:03:29 +07:00
Logging must be set to false to be disabled
This commit is contained in:
@@ -102,16 +102,20 @@ server {
|
||||
{% endfor %} # <-- Custom locations
|
||||
{% endif %}
|
||||
|
||||
{% if item.use_access_log is defined and item.use_access_log %}
|
||||
{% if item.use_access_log is defined %}
|
||||
{% if item.use_access_log %}
|
||||
access_log {{ nginx_log_dir }}/{{ __main_name }}_access.log combined;
|
||||
{% else %}
|
||||
access_log off;
|
||||
{% endif %}
|
||||
{% if item.use_error_log is defined and item.use_error_log %}
|
||||
{% endif %}
|
||||
{% if item.use_error_log is defined %}
|
||||
{% if item.use_error_log %}
|
||||
error_log {{ nginx_log_dir }}/{{ __main_name }}_error.log {{ nginx_error_log_level }};
|
||||
{% else %}
|
||||
error_log off;
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
}
|
||||
|
||||
{% if item.redirect_from is defined and item.redirect_from is iterable %}
|
||||
|
||||
Reference in New Issue
Block a user