move LE challenge root outside webroot

This commit is contained in:
Asif Bacchus 2019-10-17 01:34:52 -06:00
parent 0313a5c8bf
commit d2100c0ae0
3 changed files with 5 additions and 4 deletions

View File

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

View File

@ -15,7 +15,7 @@ server {
error_log /var/log/nginx/LetsEncrypt_error.log warn;
default_type text/plain;
root /usr/share/nginx/html/letsencrypt;
root /LEChallenge;
autoindex on;
}

View File

@ -16,7 +16,7 @@ server {
error_log /var/log/nginx/LetsEncrypt_error.log warn;
default_type text/plain;
root /usr/share/nginx/html/letsencrypt;
root /LEChallenge;
autoindex on;
}