Skip to content

Commit

Permalink
Merge pull request #3810 from Brendon-Mendicino/change_log_format_loc…
Browse files Browse the repository at this point in the history
…ation

Changing `log_format proxy` default location
  • Loading branch information
jc21 authored Jun 25, 2024
2 parents 5e35e53 + b4560d7 commit 51414ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions docker/rootfs/etc/nginx/conf.d/include/log.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
log_format proxy '[$time_local] $upstream_cache_status $upstream_status $status - $request_method $scheme $host "$request_uri" [Client $remote_addr] [Length $body_bytes_sent] [Gzip $gzip_ratio] [Sent-to $server] "$http_user_agent" "$http_referer"';
log_format standard '[$time_local] $status - $request_method $scheme $host "$request_uri" [Client $remote_addr] [Length $body_bytes_sent] [Gzip $gzip_ratio] "$http_user_agent" "$http_referer"';

access_log /data/logs/fallback_access.log proxy;
6 changes: 2 additions & 4 deletions docker/rootfs/etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@ http {
proxy_cache_path /var/lib/nginx/cache/public levels=1:2 keys_zone=public-cache:30m max_size=192m;
proxy_cache_path /var/lib/nginx/cache/private levels=1:2 keys_zone=private-cache:5m max_size=1024m;

log_format proxy '[$time_local] $upstream_cache_status $upstream_status $status - $request_method $scheme $host "$request_uri" [Client $remote_addr] [Length $body_bytes_sent] [Gzip $gzip_ratio] [Sent-to $server] "$http_user_agent" "$http_referer"';
log_format standard '[$time_local] $status - $request_method $scheme $host "$request_uri" [Client $remote_addr] [Length $body_bytes_sent] [Gzip $gzip_ratio] "$http_user_agent" "$http_referer"';

access_log /data/logs/fallback_access.log proxy;
# Log format and fallback log file
include /etc/nginx/conf.d/include/log.conf;

# Dynamically generated resolvers file
include /etc/nginx/conf.d/include/resolvers.conf;
Expand Down

0 comments on commit 51414ce

Please sign in to comment.