diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2016-12-24 15:26:15 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2016-12-24 15:26:15 +0300 |
commit | e03de35c3db3eda080bd5919b6f5712d6f30fcfb (patch) | |
tree | 2c677819eb6c2d803ca4c1b742e4f109f797eff2 /modules | |
parent | 02939ea73c27310a9e9e60a430ff64f9c9de0c51 (diff) | |
download | nixsap-e03de35c3db3eda080bd5919b6f5712d6f30fcfb.tar.gz |
nginx: added sproxy log format
Diffstat (limited to 'modules')
-rw-r--r-- | modules/apps/nginx.nix | 6 |
1 files changed, 6 insertions, 0 deletions
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; |