[Nginx]安装第三方调试模块——echo | #解决异常#unknown directive “echo”
前言
echo 模块/指令: 在Nginx中是一个第三方开发者————agentzh(章亦春)开发的、功能强大的调试工具。
location = /helloworld/ {
default_type 'text/plain';
echo 'hello world~ [= /helloworld/]'; # Nginx并没有内置echo这个指令 => 报异常: unknown directive "echo" in [Windows端 nginx 暂不支持 echo 模块的安装]
}
- 噩耗1: Nginx没有内置 echo 模块
But,Nginx并没有内置echo这个指令。
所以,在Nginx没有安装echo模块时,将报如下异常:
2020/10/10 17:37:20 [emerg] 6276#17664: unknown directive "echo" in D:\Program Files(x86)\Nginx\nginx-1.18.0/conf/johnny/proxy_tomcat_servers.conf:51
- 噩耗2:Windows端暂不支持安装 echo 模块
(网络博客的echo模块的安装教程,均是针对Linux端的) ————2020.10.10
参见本文:
windows nginx echo 模块安装 - CSDN
how to install nginx module on windows system nginx - stackoverflow
Windows 系统代码不是开源的,Nginx 没有办法动态链接模块,因此, Nginx 提供的二进制文件和其中包含的模块的使用是受限制的。

Linux OS 安装 echo 模块
模块全名: echo-nginx-module
- 1 下载 / 解压
通过下述URL,下载echo-nginx-module模块的.zip版本,并解压
https://github.com/agentzh/echo-nginx-module
- 2 配置 安装
./configure --prefix=/usr/local/nginx --add-module=/解压出来的echo-nginx-module目录
make -j2 && make install
/usr/local/nginx/sbin/nginx # 启动
- 3 使用
location /hello {
echo "$document_root<br/>hello, use echo!";
}
X 参考文献
- windows nginx echo 模块安装 - CSDN
- Nginx配置报错unknown directive "echo"的解决 - CSDN
- how to install nginx module on windows system nginx - stackoverflow
- HTTP Echo Module - Nginx
- Echo Module - Gtihub
[Nginx]安装第三方调试模块——echo | #解决异常#unknown directive “echo”的更多相关文章
- nginx 安装第三方 模块
查看nginx在安装时开启了哪些模块 如果你nginx是rpm包安装的,直接用如下命令nginx -V 如果你是源码包编译安装,假如你的安装路径是/usr/local/nginx,那么你可以使用: / ...
- nginx 安装第三方模块(lua)并热升级
需求: nginx上将特定请求拒绝,并返回特定值. 解决办法: 使用lua脚本,实现效果. 操作步骤: 安装Luajit环境 重新编译nginx(目标机器上nginx -V 配置一致,并新增两个模块n ...
- nginx安装第三方模块
原已经安装好的nginx,现在需要添加一个未被编译安装的模块 举例说明:安装第三方的ngx_cache_purge模块(用于清除指定URL的缓存) nginx的模块是需要重新编译nginx,而不是像a ...
- Linux环境Nginx安装与调试以及PHP安装
linux版本:64位CentOS 6.4 Nginx版本:nginx1.8.0 php版本:php5.5.28 1.编译安装Nginx 官网:http://wiki.nginx.org/Instal ...
- Linux环境Nginx安装、调试以及PHP安装
linux版本:64位CentOS 6.4 Nginx版本:nginx1.8.0 php版本:php5.5 1.编译安装Nginx 官网:http://wiki.nginx.org/Install 下 ...
- Linux环境Nginx安装、调试以及PHP安装(转)
linux版本:64位CentOS 6.4 Nginx版本:nginx1.8.0 php版本:php5.5 1.编译安装Nginx 官网:http://wiki.nginx.org/Install ...
- Nginx模块开发时unknown directive "echo"的处理
实际上,Nginx并没有echo这个指令,所以你贸然使用时,自然会提示说无法识别的指令,处理方法有两个: 方法一是: 从下面连接下载echo-nginx-module模块并安装: https://gi ...
- 安装第三方Python模块,增加InfoPi的健壮性
这3个第三方Python模块是可选的,不安装的话InfoPi也可以运行. 但是如果安装了,会增加InfoPi的健壮性. 目录 1.cchardet 自动检测文本编码 2.lxml 用于解析 ...
- nginx安装第三方模块echo
要使用第三方模块ngx_echo的功能,请重新配置添加到nginx插件中 ##下载第三方模块 wget https://github.com/openresty/echo-nginx-module/a ...
- nginx安装第三方模块的方法
nginx第三方模块安装方法: ./configure --prefix=/你的安装目录 --add-module=/第三方模块目录 以安装fair模块实例 下载fair安装包并解压 1.在未安装ng ...
随机推荐
- 将SNAPSHOT包上传到Nexus私服
首先确定要上传的仓库的Type为hosted,Policy为Snapshot 上传命令为: mvn deploy:deploy-file -DgroupId=com.ctg.ag -Dartifact ...
- AES加密 php7版本 openssl_encrypt 遇到的坑
与前端对接api ,解密不了前端加密的数据. 问题描述: 1.前端用 cryptojs 加密的 密钥是24位 , 2.后端用的php7的 openssl_encrypt 同密钥来进行解密,发现解密 ...
- elasticsearch第一天
启动 elasticsearch -d不能用以root用户启动 外网可访问在elasticsearch.yml中添加配置http.host: 0.0.0.0network.host: 0.0.0.0d ...
- CentOS7安装 Redis5 单实例
1.下载redis下载地址在:redis.io比如把Redis安装到/usr/local/soft/ cd /usr/local/soft/ wget http://download.redis.io ...
- OSIDP-进程描述和控制-03
什么是进程 进程是由一组元素组成的实体,基本元素包括程序代码和与代码相关的数据集(set of data),另外还包括 标识符:一个进程用于和其他进程区分的唯一标识. 状态:进程所处的状态. 优先级: ...
- js字符串常用的方法
1. charAt( ) 获取指定下标处的字符 let str = 'hello' console.log(str.charAt(0));//h 2. charCodeAt 获取下标出的字符的Un ...
- 使用阿里云镜像安装tensorflow
pip --default-timeout=1000 install --index-url https://mirrors.aliyun.com/pypi/simple tensorflow pip ...
- input number类型去掉箭头和禁用滚轮
input number类型可以输入整型.浮点型.科学计数法的数据 禁用滚轮,在input标签内添加onmouseWheel="return false" <input ty ...
- 网站下/.git/index查看
遇见有些网站目录中存在 http://target.com/.git/index 由于index是二进制文件 下载回来本地查看 初始化 下载到.git目录 git checkout-index -a
- DASCTF NOV X联合出题人-PWN
太忙了,下午4点才开始做,,剩下的以后补上 签个到 逻辑很简单两个功能的堆,一个就是申请heap.还有一个是检验如果校验通过就会得到flag 申请模块 中间0x886是个很恶心的东西,需要我们绕过 ...