diff --git a/Dockerfile b/Dockerfile index a960969..89b06de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ RUN version=$(egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release) && \ apk add --no-cache --no-progress nginx && \ sed -i 's/#gzip/gzip/' /etc/nginx/nginx.conf && \ sed -i "/http_x_forwarded_for\"';/s/';/ '/" /etc/nginx/nginx.conf && \ - sed -i "/http_x_forwarded_for/a \\\ + sed -i "/http_x_forwarded_for/a \\ \ '\$request_time \$upstream_response_time';" \ /etc/nginx/nginx.conf && \ echo -e "\n\nstream {\n include /etc/nginx/conf.d/*.stream;\n}" \ @@ -45,4 +45,4 @@ EXPOSE 80 443 HEALTHCHECK --interval=60s --timeout=15s --start-period=120s \ CMD curl -Lk 'https://localhost/index.html' -ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/nginx.sh"] \ No newline at end of file +ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/nginx.sh"] diff --git a/nginx.sh b/nginx.sh index fbce693..683f84e 100755 --- a/nginx.sh +++ b/nginx.sh @@ -100,7 +100,7 @@ proxy_request_buffering() { local value="$1" \ # org) company # Return: self-signed certs will be generated gencert() { local domain="${1:-*}" country="${2:-NO}" state="${3:-Rogaland}" \ - locality="${4:-Sola}" org="{5:-None}" dir=/etc/nginx/ssl + locality="${4:-Sola}" org="${5:-None}" dir=/etc/nginx/ssl local cert="$dir/fullchain.pem" key="$dir/privkey.pem" [[ -e $cert ]] && return [[ -d $dir ]] || mkdir -p $dir @@ -724,4 +724,4 @@ elif ps -ef | egrep -v 'grep|nginx.sh' | grep -q nginx; then echo "Service already running, please restart container to apply changes" else exec nginx -g "daemon off;" -fi \ No newline at end of file +fi