大家好:我想问个问题,我要在nginx的log_format里记录响应头里的content-type,请问是否可行,如果可行,如何做法,或者是什么变量我试着记录$http_content_type 和 $content_type无结果 非常感谢! --
如果是upstream的话试试:$upstream_http_content_type还有一个变量:$sent_http_content_type--smallfish http://chenxiaoyu.org On Fri, Aug 23, 2013 at 11:22 AM, haoyun <haoy...@163.com> wrote: 大家好:我想问个问题,我要在nginx的log_format里记录响应头里的content-type,请问是否可行,如果可行,如何做法,或者是什么变量我试着记录$http_content_type 和 $content_type无结果 非常感谢! -- --
瞬间问题得到解决,兄弟啊,你真是太强了!太谢谢你了!我在wiki.nginx.org上怎么没找到这个变量呢?兄弟能给个思路吗?怎么找到最全的变量呢? 在 2013-08-23 11:29:01,smallfish <small...@gmail.com> 写道: 如果是upstream的话试试:$upstream_http_content_type还有一个变量:$sent_http_content_type--smallfish http://chenxiaoyu.org On Fri, Aug 23, 2013 at 11:22 AM, haoyun <haoy...@163.com> wrote: 大家好:我想问个问题,我要在nginx的log_format里记录响应头里的content-type,请问是否可行,如果可行,如何做法,或者是什么变量我试着记录$http_content_type 和 $content_type无结果 非常感谢! -- -- --
请参考:http://wiki.nginx.org/HttpCoreModule#Variables--smallfish http://chenxiaoyu.org On Fri, Aug 23, 2013 at 11:48 AM, haoyun <haoy...@163.com> wrote: 瞬间问题得到解决,兄弟啊,你真是太强了!太谢谢你了!我在wiki.nginx.org上怎么没找到这个变量呢?兄弟能给个思路吗?怎么找到最全的变量呢? 在 2013-08-23 11:29:01,smallfish <small...@gmail.com> 写道: 如果是upstream的话试试:$upstream_http_content_type还有一个变量:$sent_http_content_type--smallfish http://chenxiaoyu.org On Fri, Aug 23, 2013 at 11:22 AM, haoyun <haoy...@163.com> wrote: 大家好:我想问个问题,我要在nginx的log_format里记录响应头里的content-type,请问是否可行,如果可行,如何做法,或者是什么变量我试着记录$http_content_type 和 $content_type无结果 非常感谢! -- -- -- --