Skip to content

Commit

Permalink
HTTP version
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Sep 9, 2024
1 parent 3699a36 commit d9f5c4f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/executor/runnersub.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,19 @@ export async function runConfigSubdomain(config, domaindata, subdomain, sshExec,
var phpVer = value.replace('.', '');
await sshExec(`mkdir -p ~/.local/bin; echo -e "\\u23\\u21/bin/bash\\n$(which php${phpVer}) \\u22\\u24\\u40\\u22" > ~/.local/bin/php; chmod +x ~/.local/bin/php`, false);
break;
case 'http':
var nginxInfos = nginxExec.extractInfo(nginxNodes, subdomain);
value = parseInt(value);
if (![1, 2].includes(value)) {
throw new Error(`http option invalid. specify "http 1" or "http 2"`);
}
if (value === nginxInfos.http) {
await writeLog("$> http version config is set unchanged");
} else {
await writeLog("$> Applying nginx http config on " + subdomain);
await writeLog(await nginxExec.setDirect(subdomain, nginxInfos));
}
break;
case 'ssl':
// ssl also fix any misconfigurations
var changed = false;
Expand Down

0 comments on commit d9f5c4f

Please sign in to comment.