[download-web/mirrorbits] nginx: Add ngx-fancyindex module



commit b5241c8a12d3957d16fc18fa2d05905effb7210f
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Tue Dec 8 17:05:12 2020 +0100

    nginx: Add ngx-fancyindex module

 nginx/Dockerfile | 12 +++++++++++-
 nginx/nginx.conf |  7 +++++--
 2 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/nginx/Dockerfile b/nginx/Dockerfile
index 0ead78d..ee611de 100644
--- a/nginx/Dockerfile
+++ b/nginx/Dockerfile
@@ -1,2 +1,12 @@
-FROM nginxinc/nginx-unprivileged:stable-alpine
+FROM alpine:3.12
+
+RUN apk add --no-cache nginx nginx-mod-http-fancyindex && \
+    ln -sf /dev/stdout /var/log/nginx/access.log \
+    ln -sf /dev/stderr /var/log/nginx/error.log
+
 ADD nginx.conf /etc/nginx/nginx.conf
+
+EXPOSE 8000
+STOPSIGNAL SIGQUIT
+
+ENTRYPOINT ["nginx", "-g", "daemon off;"]
diff --git a/nginx/nginx.conf b/nginx/nginx.conf
index 71428c7..9c2eac5 100644
--- a/nginx/nginx.conf
+++ b/nginx/nginx.conf
@@ -3,7 +3,7 @@ worker_processes  1;
 error_log  /dev/stderr warn;
 pid        /tmp/nginx.pid;
 
-include /usr/share/nginx/modules-available/*.conf;
+include /etc/nginx/modules/*.conf;
 
 events {
     worker_connections  1024;
@@ -39,7 +39,10 @@ http {
         autoindex on;
 
         location ~ .*/$ {
-            autoindex on;
+            fancyindex on;
+            fancyindex_exact_size off;
+            fancyindex_header /srv/ftp/FGO-HEADER.html local;
+            fancyindex_footer /srv/ftp/FGO-FOOTER.html local;
         }
 
         location / {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]