Muthu Kumar
7 years ago
8 changed files with 55 additions and 48 deletions
@ -1,7 +1,7 @@ |
|||||
// Simple function that takes a path and domain name, concatenates them with ".conf" and returns it.
|
// Simple function that takes a path and domain name, concatenates them with ".conf" and returns it.
|
||||
|
|
||||
function conf(path, domain) { |
function conf(path, domain, outPort) { |
||||
return (path + domain + ".conf"); |
return (path + domain + "." + outPort + ".conf"); |
||||
} |
} |
||||
|
|
||||
module.exports = conf; |
module.exports = conf; |
@ -1,20 +1,27 @@ |
|||||
// These functions just return paths. Later, these should be modified to poll from nginx's config.
|
// These functions just return paths. Later, these should be modified to poll from nginx's config.
|
||||
|
|
||||
|
var available = "/etc/nginx/sites-available/"; |
||||
|
var enabled = "/etc/nginx/sites-enabled/"; |
||||
|
var wwwRoot = "/var/www/"; |
||||
|
|
||||
function availableSites() { |
function availableSites() { |
||||
var availableSites = "/etc/nginx/sites-available/"; |
return available; |
||||
return availableSites; |
|
||||
} |
} |
||||
|
|
||||
function enabledSites() { |
function enabledSites() { |
||||
var enabledSites = "/etc/nginx/sites-enabled/"; |
return enabled; |
||||
return enabledSites; |
|
||||
} |
} |
||||
|
|
||||
function webRoot() { |
function webRoot() { |
||||
var webRoot = "/var/www/"; |
return wwwRoot; |
||||
return webRoot; |
} |
||||
|
|
||||
|
function webRootDomain(domain, outPort) { |
||||
|
rootWithDomain = wwwRoot + domain + "." + outPort; |
||||
|
return rootWithDomain; |
||||
} |
} |
||||
|
|
||||
module.exports.availableSites = availableSites; |
module.exports.availableSites = availableSites; |
||||
module.exports.enabledSites = enabledSites; |
module.exports.enabledSites = enabledSites; |
||||
module.exports.webRoot = webRoot; |
module.exports.webRoot = webRoot; |
||||
|
module.exports.webRootDomain = webRootDomain; |
Loading…
Reference in new issue