better nginx proxy
This commit is contained in:
@@ -13,9 +13,9 @@ map $http_upgrade $is_websocket {
|
||||
websocket 1;
|
||||
}
|
||||
|
||||
map $status $loggable {
|
||||
~^[23] 0; # Don't log 2xx and 3xx responses
|
||||
default 1; # Log 4xx and 5xx responses
|
||||
map $status $log_only_errors {
|
||||
~^2 0; # Don't log any 2xx responses
|
||||
default 1; # Log all other responses
|
||||
}
|
||||
|
||||
log_format minimal '$remote_addr - $status $request_time';
|
||||
@@ -44,7 +44,7 @@ server {
|
||||
proxy_max_temp_file_size 0; # Prevent writing to disk
|
||||
proxy_busy_buffers_size 32k;
|
||||
|
||||
access_log /dev/stdout minimal;
|
||||
access_log /dev/stdout minimal if=$log_only_errors;
|
||||
error_log /dev/stdout error;
|
||||
|
||||
proxy_connect_timeout 300s;
|
||||
|
||||
Reference in New Issue
Block a user