start storing configs to FS
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import * as plugins from "./smartnginx.plugins";
|
||||
export let getBaseConfigString = () => {
|
||||
let baseConfig = `
|
||||
let baseConfig = plugins.smartstring.indent.normalize(`
|
||||
user www-data;
|
||||
worker_processes auto;
|
||||
pid /run/nginx.pid;
|
||||
@ -65,12 +66,12 @@ export let getBaseConfigString = () => {
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
}
|
||||
daemon off;
|
||||
`;
|
||||
`);
|
||||
}
|
||||
|
||||
|
||||
export let getZoneConfigString = (zoneNameArg:string,destinationIpArg:string) => {
|
||||
let zoneConfig = `
|
||||
let zoneConfig = plugins.smartstring.indent.normalize(`
|
||||
upstream ${zoneNameArg} {
|
||||
server ${destinationIpArg};
|
||||
}
|
||||
@ -95,7 +96,7 @@ export let getZoneConfigString = (zoneNameArg:string,destinationIpArg:string) =>
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
`;
|
||||
`);
|
||||
return zoneConfig;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user