本文摘自PHP中文网,作者V,侵删。

查看已有模块
(推荐教程:nginx教程)
1 | /usr/local/nginx/sbin/nginx -V
|
此处我是安装了配置SSL 想在此加上FastDFS模块

将红色的地方复制出来记到一个小本本上
1 | ./configure --prefix=/usr/local/nginx -- with -http_stub_status_module -- with -http_ssl_module --add-module=/usr/local/fastdfs-nginx-module/src/
|

2、重新编译Nginx
在此位置重新执行上面的:./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --add-module=/usr/local/fastdfs-nginx-module/src/

千万不要make install,不然就真的覆盖了
1 | make //千万不要make install,不然就真的覆盖了
|
先备份一波,备胎还是需要的
1 | /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak
|
将编译的文件复制 到你原来的sbin 目录里
1 | cp ./objs/nginx /usr/local/nginx/sbin/
|
OK 新模块安装完成 该怎么用和以前一样,只是添加了新的模块
以上就是编译过的nginx如何添加新模块的详细内容,更多文章请关注木庄网络博客!
相关阅读 >>
nginx访问日志在哪里
nginx的配置文件在哪个目录下
nginx如何配置代理转发
详解nginx高并发配置参数
nginx和apache是什么意思
多个nginx集群怎么工作
怎么更改nginx配置文件
docker下如何安装nginx
502 bad gateway nginx什么意思
nginx哪个版本好
更多相关阅读请进入《nginx》频道 >>
转载请注明出处:木庄网络博客 » 编译过的nginx如何添加新模块