Add support for 'CUSTOM_LOG_FORMAT' env var
This commit is contained in:
parent
b0c6c9f67e
commit
c2262fc9f4
1 changed files with 4 additions and 0 deletions
|
@ -105,9 +105,13 @@ map $scheme $proxy_x_forwarded_ssl {
|
|||
|
||||
gzip_types text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
{{ if $.Env.CUSTOM_LOG_FORMAT }}
|
||||
log_format vhost '{{ $.Env.CUSTOM_LOG_FORMAT }}';
|
||||
{{ else }}
|
||||
log_format vhost '$host $remote_addr - $remote_user [$time_local] '
|
||||
'"$request" $status $body_bytes_sent '
|
||||
'"$http_referer" "$http_user_agent"';
|
||||
{{ end }}
|
||||
|
||||
access_log off;
|
||||
|
||||
|
|
Loading…
Reference in a new issue