mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-25 14:41:40 +00:00
fix bug: multi webroots
This commit is contained in:
parent
b281789777
commit
6f93064114
25
acme.sh
25
acme.sh
@ -1009,7 +1009,6 @@ issue() {
|
|||||||
_err "set up apache error. Report error to me."
|
_err "set up apache error. Report error to me."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
wellknown_path="$ACME_DIR"
|
|
||||||
else
|
else
|
||||||
usingApache=""
|
usingApache=""
|
||||||
fi
|
fi
|
||||||
@ -1242,19 +1241,21 @@ issue() {
|
|||||||
_debug serverproc $serverproc
|
_debug serverproc $serverproc
|
||||||
|
|
||||||
else
|
else
|
||||||
if [[ -z "$wellknown_path" ]] ; then
|
if [[ "$_currentRoot" == "apache" ]] ; then
|
||||||
wellknown_path="$_currentRoot/.well-known/acme-challenge"
|
wellknown_path="$ACME_DIR"
|
||||||
fi
|
|
||||||
_debug wellknown_path "$wellknown_path"
|
|
||||||
|
|
||||||
if [[ ! -d "$_currentRoot/.well-known" ]] ; then
|
|
||||||
removelevel='1'
|
|
||||||
elif [[ ! -d "$_currentRoot/.well-known/acme-challenge" ]] ; then
|
|
||||||
removelevel='2'
|
|
||||||
else
|
else
|
||||||
removelevel='3'
|
wellknown_path="$_currentRoot/.well-known/acme-challenge"
|
||||||
|
if [[ ! -d "$_currentRoot/.well-known" ]] ; then
|
||||||
|
removelevel='1'
|
||||||
|
elif [[ ! -d "$_currentRoot/.well-known/acme-challenge" ]] ; then
|
||||||
|
removelevel='2'
|
||||||
|
else
|
||||||
|
removelevel='3'
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
_debug wellknown_path "$wellknown_path"
|
||||||
|
|
||||||
token="$(echo -e -n "$keyauthorization" | cut -d '.' -f 1)"
|
token="$(echo -e -n "$keyauthorization" | cut -d '.' -f 1)"
|
||||||
_debug "writing token:$token to $wellknown_path/$token"
|
_debug "writing token:$token to $wellknown_path/$token"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user