diff options
author | Rory& <root@rory.gay> | 2024-08-16 09:05:18 +0200 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-08-16 09:05:18 +0200 |
commit | 83192cc8db7f4a40f4e4fab95fcf57f5be44ce9f (patch) | |
tree | c747acc44ab5d59091ebc22439201574f341832c /host/Rory-nginx/services/nginx/nginx.nix | |
parent | Log nginx upstreams (diff) | |
download | Rory-Open-Architecture-83192cc8db7f4a40f4e4fab95fcf57f5be44ce9f.tar.xz |
Nginx log request times
Diffstat (limited to '')
-rwxr-xr-x | host/Rory-nginx/services/nginx/nginx.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/host/Rory-nginx/services/nginx/nginx.nix b/host/Rory-nginx/services/nginx/nginx.nix index aee8378..375c3c3 100755 --- a/host/Rory-nginx/services/nginx/nginx.nix +++ b/host/Rory-nginx/services/nginx/nginx.nix @@ -33,7 +33,7 @@ in appendHttpConfig = '' #sendfile on; disable_symlinks off; - log_format combined_vhosts '$remote_addr - $remote_user [$time_local] {host="$host",server_name="$server_name",upstream=$upstream_addr} "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"'; + log_format combined_vhosts '$remote_addr - $remote_user [$time_local] {host="$host",server_name="$server_name",upstream=$upstream_addr,t=$request_time[u_conn=$upstream_connect_time,u_hdr=$upstream_header_time,u_resp=$upstream_response_time]} "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"'; access_log /var/log/nginx/access.log combined_vhosts; ''; additionalModules = with pkgs.nginxModules; [ moreheaders ]; |