fix setup
This commit is contained in:
parent
2c03dda67d
commit
f14ae6c9f4
@ -118,6 +118,7 @@ apxtri.setup = async () => {
|
|||||||
// check nginx conf and eventually change if not starting by user "current user";
|
// check nginx conf and eventually change if not starting by user "current user";
|
||||||
let etcnginx = fs.readFileSync("/etc/nginx/nginx.conf", "utf8");
|
let etcnginx = fs.readFileSync("/etc/nginx/nginx.conf", "utf8");
|
||||||
if (etcnginx.split("\n")[0] !== `user ${initadminapi.sudoUser};`) {
|
if (etcnginx.split("\n")[0] !== `user ${initadminapi.sudoUser};`) {
|
||||||
|
initadminapi.mainpath=initadminapi.townpath.replace(`/${initadminapi.townId}-${initadminapi.nationId}`,"")
|
||||||
const nginxmain = fs.readFileSync("../adminapi/apxtri/setup/nginx.maincf","utf8");
|
const nginxmain = fs.readFileSync("../adminapi/apxtri/setup/nginx.maincf","utf8");
|
||||||
console.log("Modify /etc/nginx/nginx.conf");
|
console.log("Modify /etc/nginx/nginx.conf");
|
||||||
fs.outputFileSync(
|
fs.outputFileSync(
|
||||||
|
@ -38,5 +38,5 @@ http {
|
|||||||
# Virtual Host Configs
|
# Virtual Host Configs
|
||||||
##
|
##
|
||||||
include /etc/nginx/conf.d/*.conf;
|
include /etc/nginx/conf.d/*.conf;
|
||||||
include {{{townpath}}}/*/*/nginx/*.conf;
|
include {{{mainpath}}}/*/*/nginx/*.conf;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user