宝塔面板Nginx添加fancy-index组件的方法
PS:看到一些小伙伴在论坛里问,加之也没有详细的文档供参考,便详细记录下来,以供后人参考。1.下载最新版本的Nginx fancyindex组件,命令:git clone https://github.com/aperezdc/ngx-fancyindex2.将组件拷贝到宝塔面板的Nginx源码目录:
cp -R ./ngx-fancyindex /www/server/nginx/src3.进入Nginx源码目录,查看已安装组件情况:
cd /www/server/nginx/src
nginx -V4.配置Nginx参数,并重新编译(复制一整条直接执行):./configure --prefix=/www/server/nginx --with-openssl=/www/server/nginx/src/openssl --add-module=/www/server/nginx/src/ngx_devel_kit --add-module=/www/server/nginx/src/lua_nginx_module --add-module=/www/server/nginx/src/ngx_cache_purge --add-module=/www/server/nginx/src/nginx-sticky-module --add-module=/www/server/nginx/src/nginx-http-concat --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_image_filter_module --with-http_gzip_static_module --with-http_gunzip_module --with-stream --with-stream_ssl_module --with-ipv6 --with-http_sub_module --with-http_flv_module --with-http_addition_module --with-http_realip_module --with-http_mp4_module --with-ld-opt=-Wl,-E --with-pcre=pcre-8.42 --with-cc-opt=-Wno-error --with-ld-opt=-ljemalloc --add-module=/www/server/nginx/src/ngx-fancyindex5.备份原Nginx,将编译后的文件复制过去,并重启nginx。
cd ../sbin
copy nginx nginxbak
copy ../src/objs/nginx ./nginx
systemctl restart nginx.service 6.执行命令查看fancy-index组件安装是否完成
nginx -V7.大功告成。
老规矩,有问题请在下方留言,我会一 一解答。
按照流程操作 ,提示 ./configure: warning: the "--with-ipv6" option is deprecated
于是我把--with-ipv6删了。然后编译,复制,重启,但是还是不行。nginx -v 查看依旧没有这个模块
按照这教程弄弄没成,网上搜索了好多文章也是么有成功
系统版本,以及面板版本
http://down.92wp.cn/1.png
nginx版本1.18.0
http://down.92wp.cn/2.png
插个眼 火钳刘明 -bash: ./configure: No such file or directory\
--
请问这是怎么回事,还需要安装什么吗? -bash: ./configure: No such file or directory\
--
请问大佬,这是怎么回事,还需要安装什么吗?
最后一行除了加上红色部分,还要加上最后蓝色部分才能编译成功。 按照楼主思路面板下手动编译,始终失败!!!全网也找不到相关帖子,终于自己尝试下载源码并解压到/www/nginx2/ngx-fancyindex目录下后(或进入/www/nginx2目录后直接下载克隆git clone https://github.com/aperezdc/ngx-fancyindex),通过宝塔编译安装NGINX时添加模块--add-module=/www/nginx2/ngx-fancyindex,名字为fancyindex,并切记一定要勾选【启用】!!!我第一次编译安装时没有勾选,导致模块未安装成功。编译完成后,可以搜索下安装详细里有fancyindex即为成功。终于。。。下一步就是美化页面了,比原版的autoindex好太多了。。。不过还是感谢楼主的思路和辛苦贴出。。。
页:
[1]