move error pages out of webroot

This commit is contained in:
Asif Bacchus 2019-10-17 23:27:50 -06:00
parent 9fee0fdebf
commit a555ea3bf4
2 changed files with 4 additions and 5 deletions

View File

@ -2,14 +2,13 @@ FROM nginx:mainline-alpine
# add fun error pages & LetsEncrypt challenge directory outside webroot # add fun error pages & LetsEncrypt challenge directory outside webroot
RUN apk --no-cache add git \ RUN apk --no-cache add git \
&& cd /usr/share/nginx/html \ && cd /usr/share/nginx \
&& rm -rf * \ && rm -rf html/* \
&& git clone https://git.asifbacchus.app/asif/fun-errorpages.git /tmp \ && git clone https://git.asifbacchus.app/asif/fun-errorpages.git /tmp \
&& apk del git \ && apk del git \
&& mv /tmp/errorpages/ ./ \ && mv /tmp/errorpages/ ./ \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& rm -rf /tmp/.git* \ && rm -rf /tmp/.git*
&& mkdir /LEchallenge
# standardized labels # standardized labels
LABEL maintainer="Asif Bacchus <asif@bacchus.cloud>" LABEL maintainer="Asif Bacchus <asif@bacchus.cloud>"

View File

@ -5,5 +5,5 @@ error_page 404 /errorpages/404.html;
error_page 500 502 503 504 /errorpages/50x.html; error_page 500 502 503 504 /errorpages/50x.html;
location ^~ /errorpages { location ^~ /errorpages {
root /usr/share/nginx/html; root /usr/share/nginx;
} }