nginx第三方模块安装方法
nginx第三方模块安装方法
./configure --prefix=/你的安装目录 --add-module=/第三方模块目录
比如echo模块。
没安装前,使用测试。
location /test {
echo "test here";
}
提示:
# sudo nginx -s reload
nginx: [emerg] unknown directive "echo" in /usr/local/nginx/conf/vhost/wounion.conf:26
说明并不能使用。
下面进行安装,
先查看已经有的模块。
# nginx -V
nginx version: nginx/1.12.2
built by gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10)
built with OpenSSL 1.0.2l 25 May 2017
TLS SNI support enabled
configure arguments: --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-ipv6 --with-http_sub_module --with-openssl=/usr/local/lnmp1.4-full/src/openssl-1.0.2l --with-http_image_filter_module
在nginx安装目录中创建文件夹third_moule。
下载echo模块到nginx安装目录中的third_moule。
wget https://github.com/openresty/echo-nginx-module/archive/v0.61.tar.gz
解压
sudo tar -zxvf v0.61.tar.gz
编译
sudo ./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-ipv6 --with-http_sub_module --with-openssl=/usr/local/lnmp1.4-full/src/openssl-1.0.2l --with-http_image_filter_module --add-module=/usr/local/lnmp1.4-full/src/nginx-1.12.2/third_module/echo-nginx-module-0.61
安装
sudo make
替换二级制文件
sudo cp -f ./objs/nginx /usr/local/nginx/sbin/nginx
再次查看包含模块
# nginx -V
nginx version: nginx/1.12.2
built by gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10)
built with OpenSSL 1.0.2l 25 May 2017
TLS SNI support enabled
configure arguments: --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-ipv6 --with-http_sub_module --with-openssl=/usr/local/lnmp1.4-full/src/openssl-1.0.2l --with-http_image_filter_module --add-module=/usr/local/lnmp1.4-full/src/nginx-1.12.2/third_module/echo-nginx-module-0.61
再次重启nginx试试echo模块。
sudo nginx -s reload
正常的,并没有报错。
# curl http://jiqing.wounion.com/test
test here
nginx第三方模块安装方法的更多相关文章
- python基础-7模块,第三方模块安装方法,使用方法。sys.path os sys time datetime hashlib pickle json requests xml
模块,用一砣代码实现了某个功能的代码集合. 类似于函数式编程和面向过程编程,函数式编程则完成一个功能,其他代码用来调用即可,提供了代码的重用性和代码间的耦合.而对于一个复杂的功能来,可能需要多个函数才 ...
- nginx安装第三方模块的方法
nginx第三方模块安装方法: ./configure --prefix=/你的安装目录 --add-module=/第三方模块目录 以安装fair模块实例 下载fair安装包并解压 1.在未安装ng ...
- 如何安装nginx第三方模块
nginx文件非常小但是性能非常的高效,这方面完胜apache,nginx文件小的一个原因之一是nginx自带的功能相对较少,好在nginx允许第三方模块,第三方模块使得nginx越发的强大. 在安装 ...
- Nginx 第三方模块的安装以及一致性哈希算法的使用
Nginx 第三方模块的安装以及一致性哈希算法的使用 第三方模块安装方法总结: 以ngx_http_php_memcache_standard_balancer-master为例 1:解压 到 pat ...
- 循序渐进nginx(三):日志管理、http限流、https配置,http_rewrite模块,第三方模块安装,结语
目录 日志管理 access_log error_log 日志文件切割 自定义错误页 http访问限流 限制请求数 语法 使用 限制连接数 语法 测试 补充: https配置 使用 生成证书 配置ng ...
- nginx第三方库安装以及连接memcache
一.nginx第三方模块的安装 第三方模块查询地址:https://www.nginx.com/resources/wiki/modules/ 后来新出来一个nginx memcache增强版,有空可 ...
- [svc]nginx-module-vts第三方模块安装配置
参考: https://github.com/vozlt/nginx-module-vts#installation https://github.com/kubernetes/ingress-ngi ...
- 5.pycharm中导入第三方模块的方法
最近刚入门学习python,网上查找了一些资料,发现python编程用的软件pycharm还是比较多的,于是就跟随大众,学习使用pycharm,在学习的过程中,想要导入第三方模块pyperclip,但 ...
- 一些好用的nginx第三方模块
一些好用的nginx第三方模块 转自;http://macken.iteye.com/blog/1963301 1.Development Kit https://github.com/simpl/ ...
随机推荐
- 【Android】 ImageView.ScaleType设置图解
ImageView的Scaletype决定了图片在View上显示时的样子,如进行何种比例的缩放,及显示图片的整体还是部分,等等. 设置的方式包括: 1. 在layout xml中定义android:s ...
- Mac - 如何在windows下打开 pages
1.iCloud 苹果邮箱网页版打开(www.icloud.com) 2.在pages编辑完后,导出word格式.便能继续编辑.修改文档内容,有小部分字体.设计会在导出word格式后发生改变. 3.导 ...
- 转悠望南山 Python闲谈(二)聊聊最小二乘法以及leastsq函数
1 最小二乘法概述 自从开始做毕设以来,发现自己无时无刻不在接触最小二乘法.从求解线性透视图中的消失点,m元n次函数的拟合,包括后来学到的神经网络,其思想归根结底全都是最小二乘法. 1-1 “多线 ...
- 为什么不要使用"using namespace XXX"
为什么不要使用"using namespace XXX" 1.避免降低性能 2.避免Entity冲突 This is not related to performance at a ...
- Oracle管理监控之测试环境清理用户脚本
--PL/SQL块删除用户 declare cursor cur_duser is select sid, serial# from v$session where username in ( ...
- Python实现进程同步和通信
转自:https://blog.csdn.net/u014556057/article/details/66974452
- jquery 获取对象
jquery 获取对象 1.引用this作为对象时,必须以$(this)的形式变为对象目标,否则,无法识别,会报错“ has no method”
- Linux下tomcat启动项目原因排查
先停掉tomcat服务器: 然后把文件删除: 这时候启动服务器: 看下有没有启动成功: 接着把重新优化过的代码用X ftp传上去. 等几分钟就可以. 如果老是出现问题,就去catalina.out文件 ...
- Docker Compose 入门使用指南
Compose is a tool for defining and running multi-container Docker applications. With Compose, you us ...
- 什么是API测试
什么是API API是Application Programming Interface的简写. 实现了两个或多个独立系统或模块间的通信和数据交换能力. 什么是API测试 图片.png API测试是不 ...