Skip to content

Commit

Permalink
Fix base root confusion on subdomain
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Jan 4, 2024
1 parent 010b7c7 commit caee243
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/executor/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit caee243

Please sign in to comment.