宝塔面板Nginx-Tengine编译http_concat_module模块报错“./configure: error: invalid option "--with-http_concat_mo”

2020-06-23
0评论
/
2056阅读
爱搜啊

宝塔面板Nginx-Tengine编译http_concat_module模块报错“./configure: error: invalid option "--with-http_concat_mo”

昨天把服务器Nginx修改为宝塔集成的Nginx-Tengine,后来又开启了“http_concat_module模块”现在记录下 方便以后会用到。

在网上找资料看到了这篇文章https://www.bt.cn/bbs/thread-8263-1-51.html

,一番折腾没有解决。

宝塔面板Nginx-Tengine编译http_concat_module模块报错

现在给出我自己的解决方案。

宝塔面板Nginx-Tengine编译http_concat_module模块

1、由于以前直接安装好的Nginx,这次修改为Tengine。直接在Nginx设置里面切换版本Nginx的版本。就可以修改为Tengine。

2、这点对于我们这种小白,还是非常方便的。

3、直接在“切换版本”里修改为Tengine默认http_concat_module模块是没有编译的,但是已经下载好了。

4、可以使用下面命令重新编译下就可以支持http_concat_module模块了

cd /www/server/nginx/src
./configure --user=www --group=www --prefix=/www/server/nginx --with-openssl=/www/server/nginx/src/openssl --add-module=/www/server/nginx/src/ngx_cache_purge --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-http_gunzip_module --with-http_sub_module --with-http_flv_module --with-http_addition_module --with-http_realip_module --with-http_mp4_module --add-module=/www/server/nginx/src/nginx-http-concat --with-ld-opt="-Wl,-E"
make && make install

cd /www/server/Nginx/src命令是进去宝塔面板“Nginx”安装目录。

./configure --user=www 命令是编译“Nginx”的参数,需要“Nginx”支持那些模块就是在这里编译的。

由于默认http_concat_module模块是已经下载好的。所有直接--add-module=/www/server/nginx/src/nginx-http-concat调用模块就行了。

make && make install命令就是直接编译“Nginx”了,不出意外就已经支持http_concat_module模块了。

如果使用https://www.bt.cn/bbs/thread-8263-1-51.html内河妖说的命令

模块内置了,但默认没有开启。直接--with-http_concat_module就会出现./configure: error: invalid option "--with-http_concat_module"。

使用

nginx -V

命令查看是否编译的参数里面已经带“--add-module=/www/server/nginx/src/nginx-http-concat”如果有说明已经编译成功了。


本站附件分享,如果附件失效,可以去找找看

诚通网盘附件百度网盘附件


于2020-06-23发布