Difference between revisions of "Nginx.conf"

From wikieduonline
Jump to navigation Jump to search
(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 ' '...")
 
(Redirected page to /etc/nginx/nginx.conf)
Tag: New redirect
 
(60 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
+
#redirect [[/etc/nginx/nginx.conf]]
 
 
 
 
 
 
 
 
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 '
 
    '"$http_referer" "$http_user_agent" '
 
    '$request_time $upstream_response_time $pipe';
 
</pre>
 
 
 
2) Modify access_log directive to use new format:
 
<pre>
 
access_log /var/log/nginx/yourdomain.com.access.log timed_combined;
 
</pre><ref>https://stackoverflow.com/a/39260524</ref>
 

Latest revision as of 10:50, 3 March 2021

Advertising: