fix bug: multi webroots

This commit is contained in:
neil 2016-04-16 19:23:44 +08:00
parent b281789777
commit 6f93064114

11
acme.sh
View File

@ -1009,7 +1009,6 @@ issue() {
_err "set up apache error. Report error to me."
return 1
fi
wellknown_path="$ACME_DIR"
else
usingApache=""
fi
@ -1242,11 +1241,10 @@ issue() {
_debug serverproc $serverproc
else
if [[ -z "$wellknown_path" ]] ; then
if [[ "$_currentRoot" == "apache" ]] ; then
wellknown_path="$ACME_DIR"
else
wellknown_path="$_currentRoot/.well-known/acme-challenge"
fi
_debug wellknown_path "$wellknown_path"
if [[ ! -d "$_currentRoot/.well-known" ]] ; then
removelevel='1'
elif [[ ! -d "$_currentRoot/.well-known/acme-challenge" ]] ; then
@ -1254,6 +1252,9 @@ issue() {
else
removelevel='3'
fi
fi
_debug wellknown_path "$wellknown_path"
token="$(echo -e -n "$keyauthorization" | cut -d '.' -f 1)"
_debug "writing token:$token to $wellknown_path/$token"