Skip to content

Commit 44ccef0

Browse files
committed
Added response time info to Nginx logging
1 parent 7d28fb3 commit 44ccef0

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

config/nginx.conf

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ http {
88
include mime.types;
99
default_type application/octet-stream;
1010

11+
log_format main_timed '$remote_addr - $remote_user [$time_local] "$request" '
12+
'$status $body_bytes_sent "$http_referer" '
13+
'"$http_user_agent" "$http_x_forwarded_for" '
14+
'$request_time $upstream_response_time $pipe $upstream_cache_status';
15+
16+
access_log /dev/stdout main_timed;
17+
error_log /dev/stderr info;
18+
1119
keepalive_timeout 65;
1220

1321
server {
@@ -20,9 +28,6 @@ http {
2028
root /var/www/html;
2129
index index.php index.html;
2230

23-
error_log /dev/stderr info;
24-
access_log /dev/stdout;
25-
2631
location / {
2732
# First attempt to serve request as file, then
2833
# as directory, then fall back to index.php

0 commit comments

Comments
 (0)