diff --git a/data/nginx.conf b/data/nginx.conf index 7e5ddca..44731c3 100644 --- a/data/nginx.conf +++ b/data/nginx.conf @@ -23,30 +23,30 @@ http { resolver 8.8.8.8 valid=30s ipv6=off; resolver_timeout 11s; - # log_format json_combined escape=json '{' - # '"method":"$request_method",' - # '"scheme":"$scheme",' - # '"domain":"$host",' - # '"uri":"$request_uri",' - # '"query_string":"$query_string",' - # '"referer":"$http_referer",' - # '"content_type":"$sent_http_content_type",' - # '"status": $status,' - # '"bytes_sent":$body_bytes_sent,' - # '"request_time":$request_time,' - # '"user_agent":"$http_user_agent",' - # '"cache":"$upstream_cache_status",' - # '"upstream_time": "$upstream_response_time",' - # '"timestamp":"$time_iso8601",' - # '"ip":"$http_x_forwarded_for"' - # '}'; - log_format VCOMBINED '$host:$server_port ' - '$remote_addr $remote_user [$time_local] ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent"'; + log_format json_combined escape=json '{' + '"method":"$request_method",' + '"scheme":"$scheme",' + '"domain":"$host",' + '"uri":"$request_uri",' + '"query_string":"$query_string",' + '"referer":"$http_referer",' + '"content_type":"$sent_http_content_type",' + '"status": $status,' + '"bytes_sent":$body_bytes_sent,' + '"request_time":$request_time,' + '"user_agent":"$http_user_agent",' + '"cache":"$upstream_cache_status",' + '"upstream_time": "$upstream_response_time",' + '"timestamp":"$time_iso8601",' + '"ip":"$http_x_forwarded_for"' + '}'; + # log_format VCOMBINED '$host:$server_port ' + # '$remote_addr $remote_user [$time_local] ' + # '"$request" $status $body_bytes_sent ' + # '"$http_referer" "$http_user_agent"'; - access_log /var/log/nginx/access.log VCOMBINED; + access_log /var/log/nginx/access.log json_combined; error_log /var/log/nginx/error.log debug; sendfile on; @@ -64,9 +64,9 @@ http { large_client_header_buffers 4 32k; # If using Nginx as a proxy to the Harbor core/registry - proxy_buffer_size 16k; - proxy_buffers 4 32k; - proxy_busy_buffers_size 64k; + proxy_buffer_size 128k; + proxy_buffers 4 256k; + proxy_busy_buffers_size 256k; proxy_connect_timeout 300; proxy_send_timeout 300;