当前位置: 首页 > news >正文

nginx报错-[emerg] unknown directive “echo_reset_timer“

报错 - nginx: [emerg] unknown directive “echo_reset_timer”

问题描述:

nginx: [emerg] unknown directive “echo_reset_timer” in /etc/nginx/conf/conf.d/pc.conf:86

nginx: configuration file /etc/nginx/conf/nginx.conf test failed

问题原因:

没有指定模块源码路径

解决方法:

[root@centos8 ~]# cd /usr/local/src
[root@centos8 src]# yum install git -y
[root@centos8 src]# git clone https://github.com/openresty/echo-nginx-module.git
[root@centos8 src]# cd nginx-1.18.0/
[root@centos8 src]# ./configure \
--prefix=/etc/nginx \
--user=nginx --group=nginx \
--with-http_ssl_module \
--with-http_v2_module \
--with-http_realip_module \
--with-http_stub_status_module \
--with-http_gzip_static_module \
--with-pcre \
--with-stream \
--with-stream_ssl_module \
--with-stream_realip_module \
--with-http_perl_module \
--add-module=/usr/local/src/echo-nginx-module #指定模块源代码路径[root@centos8 src]# make && make install#确认语法检测通过
[root@centos8 ~]# /apps/nginx/sbin/nginx -t
nginx: the configuration file /apps/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /apps/nginx/conf/nginx.conf test is successful#重启nginx访问测试
[root@centos8 ~]# systemctl restart nginx
[root@centos8 ~]#nginx -V
nginx version: wanginx/1.68.9
built by gcc 8.3.1 20191121 (Red Hat 8.3.1-5) (GCC)
built with OpenSSL 1.1.1c FIPS 28 May 2019
TLS SNI support enabled
configure arguments: --prefix=/apps/nginx --user=nginx --group=nginx --withhttp_ssl_module --with-http_v2_module --with-http_realip_module --withhttp_stub_status_module --with-http_gzip_static_module --with-pcre --with-stream --with-stream_ssl_module --with-stream_realip_module --addmodule=/usr/local/src/echo-nginx-module

相关文章:

  • 【评测】免费体验dify工作流模式下腾讯语音转文字speech2text服务
  • 局部放电在线监测系统的数据传输协议选择研究:Modbus TCP 与 MQTT
  • libmemcached库api接口讲解五
  • 学习黑客NFC技术详解
  • day25 python异常处理
  • Leetcode209做题笔记
  • 常用的Java工具库
  • 【大模型面试每日一题】Day 18:大模型中KV Cache的作用是什么?如何通过Window Attention优化其内存占用?
  • AIX环境ORACLE RAC节点无法加入集群问题分析
  • Windows更新暂停七天关键注册表
  • centos中postfix的作用
  • 基于多目标进化算法的神经网络架构搜索及其高级可视化技术
  • Spring的Validation,这是一套基于注解的权限校验框架
  • 视网膜屏幕:重新定义数字显示的革命性技术
  • Windows系统Anaconda/Miniconda的安装、配置、基础使用、清理缓存空间和Pycharm/VSCode配置指南
  • 打破边界,智评未来:AI如何重塑学科交叉融合的评价体系?
  • QT-1.信号与槽
  • 入门OpenTelemetry——可观测性与链路追踪介绍
  • 【周输入】510周阅读推荐-2
  • [python] Python单例模式:__new__与线程安全解析
  • 杭州“放大招”支持足球发展:足球人才可评“高层次人才”
  • 牛市早报|中方调整对美加征关税措施,五部门约谈外卖平台企业
  • 一手实测深夜发布的世界首个设计Agent - Lovart。
  • 李公明谈“全球南方”与美术馆
  • 金价大跌!足金饰品每克一夜便宜14元,涨势是否已终结?
  • 马鞍山市原常务副市长黄化锋一审获刑11年,涉案金额三千余万元