Difference between revisions of "Nginx.conf"
Jump to navigation
Jump to search
↑ https://lincolnloop.com/blog/tracking-application-response-time-nginx/
↑ https://stackoverflow.com/a/39260524
Line 1: | Line 1: | ||
− | + | * Error log file: <code>/var/log/nginx/error.log</code> | |
+ | * Access log file: <code>/var/log/nginx/access.log</code> | ||
Revision as of 08:15, 26 December 2019
- Error log file:
/var/log/nginx/error.log
- Access log file:
/var/log/nginx/access.log
Track Application Response time in Nginx [1]
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;
request_time
This shows how long Nginx dealt with the requestupstream_response_time
Gives us the time it took our upstream server (in this case Apache/mod_wsgi) to respondpipe
Shows ‘p’ in case the request was pipelined.
See also
- Web server: Nginx:
/etc/nginx/nginx.conf
,nginx -t
, Nginx logs, Nginx change log, PHP,php-fpm
, Let's encrypt, Nginx directives, Reverse Proxy, Configure HTTP redirection Nginx, Return,proxy_pass (Reverse proxy)
,ngx_http_rewrite_module
,/etc/nginx/sites-enabled/
,error.log
,access.log
,/nginx status
, AIO - Apache web server
- Reverse proxy
Advertising: