docker - 在 Alpine nginx docker 镜像上设置 fancyindex
问题描述
我正在尝试在 Nginx Alpine docker 映像上设置 fancyindex。我有以下
FROM nginx:alpine
RUN apk update
RUN apk add nginx-mod-http-fancyindex \
--repository https://alpine.global.ssl.fastly.net/alpine/edge/community \
--repository https://alpine.global.ssl.fastly.net/alpine/edge/main \
--repository https://dl-3.alpinelinux.org/alpine/edge/testing
RUN rm -rf /usr/share/nginx/html/*
COPY nginx.conf /etc/nginx/
EXPOSE 80
CMD [ "nginx" ]
在顶部的 nginx.conf 文件中,我添加了一行
load_module "/usr/lib/nginx/modules/ngx_http_fancyindex_module.so";
但我看到一个错误
1#1: module "/usr/lib/nginx/modules/ngx_http_fancyindex_module.so" version 1020001 instead of 1021000 in /etc/nginx/nginx.conf:1
nginx: [emerg] module "/usr/lib/nginx/modules/ngx_http_fancyindex_module.so" version 1020001 instead of 1021000 in /etc/nginx/nginx.conf:1
我该如何解决这个问题?我在设置fancyindex的正确道路上吗?
解决方案
推荐阅读
- c# - 为 1:2 关系使用按层次结构继承的表
- wordpress - Wordpress 小部件中缺少 jQuery
- typescript - 如何根据数组长度推断函数参数的数量
- reactjs - 在 React Devtools 分析器中搜索组件?
- reactjs - React 和 dexie:功能组件中出现“无效的钩子调用”错误
- excel - 在列和行中循环以查找和复制值
- excel - VBA中具有自定义范围的Excel函数
- xcode - 为什么 Xcode 不显示不推荐使用的方法?
- r - 如何使这个情节更明显?
- graphql - GraphQL 中 ClassSerializerInterceptor 的 NestJS 问题