Writing Header to Logfile

Liu Lantao liulantao at gmail.com
Sat Jul 8 17:33:54 UTC 2017

According to nginx document (http://nginx.org/en/docs/http/ngx_http_core_module.html#var_http_):

arbitrary request header field; the last part of a variable name is the field name converted to lower case with dashes replaced by underscores

if the request header name is 'X-Custom-Header', then the variable name is ‘$http_x_custom_header’.

> On Jul 7, 2017, at 11:55 PM, mailinglisten at simonhoenscheid.de wrote:
> Hello List,
> I would like to log a header which is send with the incoming request into a custom log field. How can this be done?
> Kind Regards
> Simon
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

More information about the nginx mailing list