diff --git a/nginx.conf b/nginx.conf index a54e08cc..39cc04fd 100644 --- a/nginx.conf +++ b/nginx.conf @@ -10,8 +10,12 @@ events { daemon off; http { + + log_format main escape=json '{"remote_address": "$remote_addr", "remote_user": "$remote_user", "time" : "$time_local", "request": "$request", "status": "$status", "body_bytes_sent": "$body_bytes_sent", "referer": "$http_referer","http_user_agent": "$http_user_agent", "http_x_forwrded_for": "$http_x_forwarded_for"}'; + server { listen 80; + access_log /var/log/nginx/access.log main; root /usr/share/nginx/html; include /etc/nginx/mime.types;