r/nginx: Make logging to files optional
If _nginx_ is configured to send error/access log messages to syslog, it may not make sense to _also_ send messages to log files as well. The `nginx_error_log_file` and `nginx_access_log_file` variables are now available to control whether/where to send log messages. Setting either of these to a falsy value will disable logging to a file. A non-empty string value is interpreted as the path to a log file. By default, the existing behavior of logging to `/var/log/nginx/error.log` and `/var/log/nginx/access.log` is preserved.
This commit is contained in:
@@ -4,5 +4,7 @@ nginx_ssl_session_cache: shared:SSL:1m
|
||||
nginx_ssl_session_timeout: 10m
|
||||
nginx_ssl_ciphers: '{{ nginx_default_ssl_ciphers }}'
|
||||
nginx_log_syslog: true
|
||||
nginx_error_log_file: /var/log/nginx/error.log
|
||||
nginx_access_log_file: /var/log/nginx/access.log
|
||||
nginx_redirect_http_https: false
|
||||
nginx_keep_num_logs: 10
|
||||
|
||||
Reference in New Issue
Block a user