【Nginx五】Nginx常用日志格式含义
编程技术  /  houtizong 发布于 3年前   78
1.1 log_format指令用于指定日志的格式,格式:
log_format name(格式名称) type(格式样式)
1.2 如下是一个常用的Nginx日志格式:
log_format main '[$time_local]|$request_time|$status|$body_bytes_sent|$remote_addr|"$request"|"$http_referer"|"$http_user_agent"|$http_x_forwarded_for|$upstream_cache_status|$upstream_response_time|$upstream_status|$upstream_addr';
1.3 各个格式参数的含义:
MISS
EXPIRED - expired, request was passed to backend
UPDATING - expired, stale response was used due to proxy/fastcgi_cache_use_stale updating
STALE - expired, stale response was used due to proxy/fastcgi_cache_use_stale
HIT - (dash) - request never reached to upstream module. Most likely it was processed at Nginx-level only (e.g. forbidden, redirects, etc) (Ref: Mail Thread)
access_log /usr/local/nginx/access.log main;
指定日志文件以及日志格式
请勿发布不友善或者负能量的内容。与人为善,比聪明更重要!
技术博客集 - 网站简介:
前后端技术:
后端基于Hyperf2.1框架开发,前端使用Bootstrap可视化布局系统生成
网站主要作用:
1.编程技术分享及讨论交流,内置聊天系统;
2.测试交流框架问题,比如:Hyperf、Laravel、TP、beego;
3.本站数据是基于大数据采集等爬虫技术为基础助力分享知识,如有侵权请发邮件到站长邮箱,站长会尽快处理;
4.站长邮箱:[email protected];
文章归档
文章标签
友情链接