码迷,mamicode.com
首页 > 其他好文 > 详细

Nginx 非覆盖添加模块

时间:2015-05-17 02:10:57      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:nginx

nginx -V 可以查看原来编译时都带了哪些参数
原来的参数:
--prefix=/usr/local/nginx

添加的参数:
--with-http_stub_status_module --with-http_ssl_module --with-http_realip_module

步骤如下:
1. 使用参数重新配置:
./configure --prefix=/usr/local/nginx -user=nobody -group=nobody --with-http_stub_status_module --with-http_ssl_module --with-http_realip_module --add-module=../nginx_upstream_hash-0.3.1/ --add-module=../gnosek-nginx-upstream-fair-2131c73/
2. 编译:
make
#不要make install,否则就是覆盖安装
3. 替换nginx二进制文件:
cp /app/nginx/sbin/nginx /app/nginx/sbin/nginx.bak
cp ./objs/nginx /app/nginx/sbin/
4.重新加载配置文件


本文出自 “咚咚的博客” 博客,转载请与作者联系!

Nginx 非覆盖添加模块

标签:nginx

原文地址:http://weadyweady.blog.51cto.com/3012956/1651997

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!