nginx变量(日志log_format)

  • HTTP请求变量 - arg_PARAMETER、http_HEADER、sent_http_HEADER

它是指http请求中的变量,举例: 

curl访问百度页面,需要在access.log显示Host字段内容

nginx变量(日志log_format)

修改/etc/nginx/nginx.conf,配置内容等于http+请求包头名称

nginx变量(日志log_format)

访问页面

nginx变量(日志log_format)

 

  • 内置变量 - ngnix内置的

http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format

 

  • 自定义变量 - 自己定义

 

相关文章:

  • 2021-08-13
  • 2022-01-03
  • 2021-11-19
  • 2021-11-22
  • 2022-12-23
  • 2021-09-05
  • 2022-02-04
  • 2022-12-23
猜你喜欢
  • 2022-02-04
  • 2021-09-16
  • 2022-12-23
  • 2021-07-15
  • 2021-11-19
  • 2021-11-19
  • 2021-10-20
相关资源
相似解决方案