From e03de35c3db3eda080bd5919b6f5712d6f30fcfb Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Sat, 24 Dec 2016 15:26:15 +0300 Subject: nginx: added sproxy log format --- modules/apps/nginx.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules') diff --git a/modules/apps/nginx.nix b/modules/apps/nginx.nix index 1b10145..b8af241 100644 --- a/modules/apps/nginx.nix +++ b/modules/apps/nginx.nix @@ -130,6 +130,12 @@ in { include ${pkgs.nginx}/conf/mime.types; default_type application/octet-stream; + # This is `combined` format with $remote_user replaced by $http_from. + # $http_from is provided by Sproxy: https://hackage.haskell.org/package/sproxy2 + log_format sproxy '$remote_addr - $http_from [$time_local] ' + '"$request" $status $body_bytes_sent ' + '"$http_referer" "$http_user_agent"'; + access_log off; error_log stderr info; -- cgit v1.2.3