Commit 6f930641 authored by neil's avatar neil
Browse files

fix bug: multi webroots

parent b2817897
...@@ -1009,7 +1009,6 @@ issue() { ...@@ -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,11 +1241,10 @@ issue() { ...@@ -1242,11 +1241,10 @@ issue() {
_debug serverproc $serverproc _debug serverproc $serverproc
else else
if [[ -z "$wellknown_path" ]] ; then if [[ "$_currentRoot" == "apache" ]] ; then
wellknown_path="$ACME_DIR"
else
wellknown_path="$_currentRoot/.well-known/acme-challenge" wellknown_path="$_currentRoot/.well-known/acme-challenge"
fi
_debug wellknown_path "$wellknown_path"
if [[ ! -d "$_currentRoot/.well-known" ]] ; then if [[ ! -d "$_currentRoot/.well-known" ]] ; then
removelevel='1' removelevel='1'
elif [[ ! -d "$_currentRoot/.well-known/acme-challenge" ]] ; then elif [[ ! -d "$_currentRoot/.well-known/acme-challenge" ]] ; then
...@@ -1254,6 +1252,9 @@ issue() { ...@@ -1254,6 +1252,9 @@ issue() {
else else
removelevel='3' 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"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment