diff --git a/nginx/Dockerfile b/nginx/Dockerfile index 15d00972..2a8308f9 100644 --- a/nginx/Dockerfile +++ b/nginx/Dockerfile @@ -4,6 +4,8 @@ RUN apk add --no-cache nginx-mod-http-lua openssl COPY nginx.conf.default /etc/nginx/nginx.conf.default COPY nginx.conf.fallback /etc/nginx/nginx.conf.fallback +COPY http.d /etc/nginx/ +COPY extra.d /etc/nginx/ COPY start.sh /start.sh diff --git a/nginx/extra.d/.keep b/nginx/extra.d/.keep new file mode 100644 index 00000000..e69de29b diff --git a/nginx/http.d/.keep b/nginx/http.d/.keep new file mode 100644 index 00000000..e69de29b diff --git a/nginx/nginx.conf.default b/nginx/nginx.conf.default index 2dd4729c..87982712 100644 --- a/nginx/nginx.conf.default +++ b/nginx/nginx.conf.default @@ -50,6 +50,7 @@ http { set_by_lua $webdav 'return os.getenv("WEBDAV")'; set_by_lua $expose_admin 'return os.getenv("EXPOSE_ADMIN")'; + include http.d/*.conf; # Actual logic location / { @@ -97,3 +98,5 @@ http { } } } + +include extra.d/*.conf; diff --git a/nginx/nginx.conf.fallback b/nginx/nginx.conf.fallback index 985c6189..50bb77cb 100644 --- a/nginx/nginx.conf.fallback +++ b/nginx/nginx.conf.fallback @@ -36,6 +36,8 @@ http { add_header Strict-Transport-Security max-age=15768000; + include http.d/*.conf; + if ($scheme = http) { return 301 https://$host$request_uri; } @@ -45,3 +47,5 @@ http { } } } + +include extra.d/*.conf;