Difference between revisions of "Nginx.conf"
Jump to navigation
Jump to search
↑ https://stackoverflow.com/a/39260524
(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 ' '...") |
|||
Line 16: | Line 16: | ||
access_log /var/log/nginx/yourdomain.com.access.log timed_combined; | access_log /var/log/nginx/yourdomain.com.access.log timed_combined; | ||
</pre><ref>https://stackoverflow.com/a/39260524</ref> | </pre><ref>https://stackoverflow.com/a/39260524</ref> | ||
+ | |||
+ | |||
+ | == See also == | ||
+ | * [[Nginx change log]] | ||
+ | * [[Apache web server]] | ||
+ | * [[Reverse proxy]] | ||
+ | |||
+ | [[Category:Web server software]] |
Revision as of 10:39, 12 December 2019
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;
See also
Advertising: