是否可以content-type在Nginx的日志文件中查看对请求的响应?目前,这就是我看到的有关请求的内容:
127.0.0.1 - - [23/Nov/2012:10:17:19 -0500] "GET /fonts/cantarell-bold-webfont.eot? HTTP/1.1" 200 22679 "https://www.example.com/blah/doc" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET4.0C)"
Run Code Online (Sandbox Code Playgroud)
Mic*_*lif 12
根据官方nginx文档,您可以$sent_http_content_type在您的log_format声明中使用:
log_format myCustomFormatTemplate '$remote_addr - $remote_user [$time_local] '
'"$request" $status $sent_http_content_type $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7010 次 |
| 最近记录: |