From a555ea3bf48628dc225d99b975ae7f83aa57c40c Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Thu, 17 Oct 2019 23:27:50 -0600 Subject: [PATCH] move error pages out of webroot --- build/Dockerfile | 7 +++---- build/config/errorpages.conf | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 0888b68..ec6cfd8 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -2,14 +2,13 @@ FROM nginx:mainline-alpine # add fun error pages & LetsEncrypt challenge directory outside webroot RUN apk --no-cache add git \ - && cd /usr/share/nginx/html \ - && rm -rf * \ + && cd /usr/share/nginx \ + && rm -rf html/* \ && git clone https://git.asifbacchus.app/asif/fun-errorpages.git /tmp \ && apk del git \ && mv /tmp/errorpages/ ./ \ && rm -rf /tmp/* \ - && rm -rf /tmp/.git* \ - && mkdir /LEchallenge + && rm -rf /tmp/.git* # standardized labels LABEL maintainer="Asif Bacchus " diff --git a/build/config/errorpages.conf b/build/config/errorpages.conf index d7ed0a0..71e62ea 100644 --- a/build/config/errorpages.conf +++ b/build/config/errorpages.conf @@ -5,5 +5,5 @@ error_page 404 /errorpages/404.html; error_page 500 502 503 504 /errorpages/50x.html; location ^~ /errorpages { - root /usr/share/nginx/html; + root /usr/share/nginx; }