Nginx.conf

From wikieduonline
Revision as of 10:38, 12 December 2019 by Welcome (talk | contribs) (Created page with " 1) Add to <code>/etc/nginx/nginx.conf</code> <pre> log_format timed_combined '$remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search



1) Add to /etc/nginx/nginx.conf

log_format timed_combined '$remote_addr - $remote_user [$time_local] '
    '"$request" $status $body_bytes_sent '
    '"$http_referer" "$http_user_agent" '
    '$request_time $upstream_response_time $pipe';

2) Modify access_log directive to use new format:

access_log /var/log/nginx/yourdomain.com.access.log timed_combined;

[1]

Advertising: