consolidate naming and start exporting interfaces
This commit is contained in:
@ -71,26 +71,26 @@ export let getBaseConfigString = () => {
|
||||
}
|
||||
|
||||
|
||||
export let getZoneConfigString = (zoneNameArg:string,destinationIpArg:string) => {
|
||||
let zoneConfig = plugins.smartstring.indent.normalize(`
|
||||
upstream ${zoneNameArg} {
|
||||
export let getHostConfigString = (hostNameArg:string,destinationIpArg:string) => {
|
||||
let hostConfig = plugins.smartstring.indent.normalize(`
|
||||
upstream ${hostNameArg} {
|
||||
server ${destinationIpArg};
|
||||
}
|
||||
|
||||
server {
|
||||
listen *:80 ;
|
||||
server_name ${zoneNameArg};
|
||||
rewrite ^ https://${zoneNameArg}$request_uri? permanent;
|
||||
server_name ${hostNameArg};
|
||||
rewrite ^ https://${hostNameArg}$request_uri? permanent;
|
||||
}
|
||||
|
||||
server {
|
||||
listen *:443 ssl;
|
||||
server_name ${zoneNameArg};
|
||||
ssl_certificate /LE_CERTS/${zoneNameArg}/fullchain.pem;
|
||||
ssl_certificate_key /LE_CERTS/${zoneNameArg}/privkey.pem;
|
||||
server_name ${hostNameArg};
|
||||
ssl_certificate /LE_CERTS/${hostNameArg}/fullchain.pem;
|
||||
ssl_certificate_key /LE_CERTS/${hostNameArg}/privkey.pem;
|
||||
|
||||
location / {
|
||||
proxy_pass http://${zoneNameArg};
|
||||
proxy_pass http://${hostNameArg};
|
||||
include /etc/nginx/proxy_params;
|
||||
}
|
||||
location ~ /\.git {
|
||||
@ -98,6 +98,6 @@ export let getZoneConfigString = (zoneNameArg:string,destinationIpArg:string) =>
|
||||
}
|
||||
}
|
||||
`);
|
||||
return zoneConfig;
|
||||
return hostConfig;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user