Skip to content

Commit 51414ce

Browse files
authored
Merge pull request NginxProxyManager#3810 from Brendon-Mendicino/change_log_format_location
Changing `log_format proxy` default location
2 parents 5e35e53 + b4560d7 commit 51414ce

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
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"';
2+
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"';
3+
4+
access_log /data/logs/fallback_access.log proxy;

docker/rootfs/etc/nginx/nginx.conf

+2-4
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,8 @@ http {
4343
proxy_cache_path /var/lib/nginx/cache/public levels=1:2 keys_zone=public-cache:30m max_size=192m;
4444
proxy_cache_path /var/lib/nginx/cache/private levels=1:2 keys_zone=private-cache:5m max_size=1024m;
4545

46-
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"';
47-
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"';
48-
49-
access_log /data/logs/fallback_access.log proxy;
46+
# Log format and fallback log file
47+
include /etc/nginx/conf.d/include/log.conf;
5048

5149
# Dynamically generated resolvers file
5250
include /etc/nginx/conf.d/include/resolvers.conf;

0 commit comments

Comments
 (0)