From a6ac368476997748e0cb7ca1f3372f2d68a1a38b Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 16 Jun 2015 11:37:08 +1000 Subject: [PATCH] FEATURE: add a custom log format for better analysis --- config/nginx.sample.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/nginx.sample.conf b/config/nginx.sample.conf index 838e98b9cb7..f81265a7bf9 100644 --- a/config/nginx.sample.conf +++ b/config/nginx.sample.conf @@ -25,8 +25,12 @@ map $http_x_forwarded_proto $thescheme { https https; } +log_format log_discourse '[$time_local] $remote_addr $request $sent_http_x_discourse_route $upstream_response_time $request_time'; + server { + access_log /var/log/nginx/access.log log_discourse; + listen 80; gzip on; gzip_vary on;