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/ ...
随机推荐
- mysql如何查询日期的列表?
转自:http://blog.csdn.net/liufei198613/article/details/72643345 select @num:=@num+1,date_format(adddat ...
- zeptojs使用及介绍,手机端为什么一定要用zeptojs?
zepto是和jQuery和类似的框架,由于jQuery内置了很多解决浏览器兼容性的代码,导致jQuery过于臃肿,对于移动端来说,不需要太过于考虑浏览器的兼容,所以就诞生zeptojs. 总的来说: ...
- Animate CC 2017
一.Animate CC 2017 下载及安装 http://www.ddooo.com/softdown/86853.htm
- The Rise of Database Sharding DATABASE SHARDING
w玻璃碎片.0共享 http://www.agildata.com/database-sharding/ The Rise of Database Sharding The concept of Da ...
- The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path(Myeclipse添加Server Library)
网上找练习的项目导入到myeclipse项目发现每个JSP 出现错误The superclass "javax.servlet.http.HttpServlet" was not ...
- Qt::QWidget 无默认标题栏边框的拖拽修改大小方式
开发环境:win10+vs2015+qt5.9.1 背景:开发过程中,一般很少会使用系统提供的标题栏和边框:往往都是自定义一个自己设计的方案.这时候在QWidget中需要加上flag:Qt::Fram ...
- 两个提高工作效率的神器-Restlet Client和fe助手
首先是要FQ,百度***或者直接下载蓝灯. 然后安装第一个WEB前端助手:
- 最长DNA重复序列长度,并输出该序列。 JAVA
1: 最长DNA重复序列长度,并输出该序列. 例如 ATCGTAGATCG,它的最大长度为4,序列为 ATCG. package com.li.huawei; import java.util.S ...
- mysql根据经纬度获取附近的商家
create table geo( geo_id INT NOT NULL AUTO_INCREMENT, lng float NOT NULL, lat float NOT NULL, name ) ...
- js动态移动滚动条至底部示例
使用js动态移动滚动条至底部. var currentPosition,timer; function GoBottom(){ timer=setInterval("runToBotto ...