diff --git a/apxtri/apxtri.js b/apxtri/apxtri.js index 5892846..d5e1789 100755 --- a/apxtri/apxtri.js +++ b/apxtri/apxtri.js @@ -118,6 +118,7 @@ apxtri.setup = async () => { // check nginx conf and eventually change if not starting by user "current user"; let etcnginx = fs.readFileSync("/etc/nginx/nginx.conf", "utf8"); 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"); console.log("Modify /etc/nginx/nginx.conf"); fs.outputFileSync( diff --git a/apxtri/setup/nginx.maincf b/apxtri/setup/nginx.maincf index 34561f0..d6c8bd6 100644 --- a/apxtri/setup/nginx.maincf +++ b/apxtri/setup/nginx.maincf @@ -38,5 +38,5 @@ http { # Virtual Host Configs ## include /etc/nginx/conf.d/*.conf; - include {{{townpath}}}/*/*/nginx/*.conf; + include {{{mainpath}}}/*/*/nginx/*.conf; }