bundles/nginx: enable creating logs for debugging purposes
This commit is contained in:
parent
553ed05ba2
commit
b01dcb0ff9
2 changed files with 6 additions and 3 deletions
|
@ -54,13 +54,16 @@ server {
|
|||
resolver 8.8.8.8 8.8.4.4 valid=300s;
|
||||
resolver_timeout 5s;
|
||||
|
||||
% if create_access_log:
|
||||
% if create_logs:
|
||||
access_log /var/log/nginx/access-${vhost}.log gdpr;
|
||||
error_log /var/log/nginx/error-${vhost}.log;
|
||||
% else:
|
||||
# regular access_log is disabled
|
||||
# error_log is disabled
|
||||
% endif
|
||||
% if create_timing_log:
|
||||
access_log /var/log/nginx-timing/${vhost}.log anon_timing;
|
||||
% endif
|
||||
# error_log is disabled globally
|
||||
|
||||
% if max_body_size:
|
||||
client_max_body_size ${max_body_size};
|
||||
|
|
|
@ -125,7 +125,7 @@ for vhost, config in node.metadata.get('nginx/vhosts', {}).items():
|
|||
'source': 'site_template',
|
||||
'content_type': 'mako',
|
||||
'context': {
|
||||
'create_access_log': config.get('access_log', node.metadata.get('nginx/access_log', False)),
|
||||
'create_logs': config.get('create_logs', False),
|
||||
'create_timing_log': config.get('timing_log', True),
|
||||
'php_version': node.metadata.get('php/version', ''),
|
||||
'security_txt': security_txt_enabled,
|
||||
|
|
Loading…
Reference in a new issue