From caee243fdede8a2dab61b84512c6abfe03ee27b3 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Thu, 4 Jan 2024 14:00:06 +0700 Subject: [PATCH] Fix base root confusion on subdomain --- src/executor/runner.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/executor/runner.js b/src/executor/runner.js index a86f160..fa6de6e 100644 --- a/src/executor/runner.js +++ b/src/executor/runner.js @@ -771,6 +771,10 @@ export async function runConfigSubdomain(config, domaindata, subdomain, sshExec, case 'root': // remove prefix and trailing slash value = value.replace(/^\/+/, '').replace(/\/+$/, ''); + if (!stillroot && value.startsWith('domains/' + subdomain + '/')) { + // confusion with nginx generator + value = value.substring(('domains/' + subdomain + '/').length); + } var absolutePath = path.join(subdomaindata['Home directory'], value); if (absolutePath !== subdomaindata['HTML directory']) { await writeLog("$> Changing root folder");