Nginx(4)通用配置

安装echo模块

在Centos7.9系统里面添加echo模块,用于nginx配置相关的debug。

首先需要下载压缩包

预置变量

内置变量一般用于获取请求或响应的各种信息,由NGINX各模块自动产生.

路径匹配

参数映射

日志

默认的日志位置。

  • access /var/log/nginx/access.log
  • error /var/log/nginx/error.log

参考

Alphabetical index of variables
与request有关的变量
openresty/echo-nginx-module(Github)