Skip to content

Commit 757d711

Browse files
committed
fix: correct acme.sh webroot path for HTTP-01 validation
acme.sh --webroot expects the document root and appends /.well-known/acme-challenge/<token> itself. Passing challengeDir caused double nesting, resulting in 404 from Let's Encrypt.
1 parent b0cba68 commit 757d711

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/GetSslMain.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,9 @@ public function startGetCertSsl(bool $asynchronously = true): PBXApiResult
388388
$cmd = $envExports . $cmd;
389389
} else {
390390
// HTTP-01 challenge via webroot
391-
$webroot = $this->dirs['challengeDir'];
391+
// acme.sh appends /.well-known/acme-challenge/<token> to webroot,
392+
// so pass the document root (confDir), not the challenge dir
393+
$webroot = $this->dirs['confDir'];
392394
$cmd .= " --webroot " . escapeshellarg($webroot);
393395
}
394396

0 commit comments

Comments
 (0)