Add 'auth_basic off;' to lets encrypt configuration for nginx.

This commit is contained in:
Christoph 2018-09-02 18:54:56 +02:00
parent 79e2941486
commit c12ec9bdfa

View File

@ -449,6 +449,8 @@ location /.well-known/acme-challenge/ {
location ~ /.well-known/acme-challenge/(.*) {
default_type text/plain;
}
auth_basic off;
}
EOF
if [[ $? -eq 0 ]] ; then
@ -462,6 +464,7 @@ EOF
fi
fi
if [[ -n "$GITLAB_CONF_FILE" ]]; then
echononl " Adjust GitLab Configuration (${GITLAB_CONF_FILE})"
@ -474,7 +477,7 @@ if [[ -n "$GITLAB_CONF_FILE" ]]; then
## Added by dehydrated install script $(basename $0)
################################################################################
nginx['custom_gitlab_server_config'] = "location ^~ /.well-known/acme-challenge { alias /var/www/dehydrated; }"
nginx['custom_gitlab_server_config'] = "location ^~ /.well-known/acme-challenge {\\n alias /var/www/dehydrated;\\n auth_basic off;\\n}\\n"
EOF
if [[ $? -eq 0 ]] ; then
@ -484,7 +487,7 @@ EOF
echo_failed
fi
else
perl -i -n -p -e "s#^(\s*\#\s*(nginx\['custom_gitlab_server_config'\]).*)#\1\n\2 = \"location ^~ /.well-known/acme-challenge { alias \/var\/www\/dehydrated; }\"#" $GITLAB_CONF_FILE
perl -i -n -p -e "s#^(\s*\#\s*(nginx\['custom_gitlab_server_config'\]).*)#\1\n\2 = \"location ^~ /.well-known/acme-challenge {\\\n alias \/var\/www\/dehydrated;\\\n auth_basic off;\\\n}\\\n\"#" $GITLAB_CONF_FILE
if [[ $? -eq 0 ]] ; then
echo_ok
gitlab_reconfigure=true