mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-11-25 23:53:07 +01:00
Added support for redirection and 404 hosts
This commit is contained in:
1 parent
61820840e0
commit
64de096565
22 files changed
+453
-31
No files matched your search
@@ -45,7 +45,11 @@ const internalNginx = {
|
||||
let filename = internalNginx.getConfigName(host);
|
||||
|
||||
try {
|
||||
template = fs.readFileSync(__dirname + '/../templates/host.conf.ejs', {encoding: 'utf8'});
|
||||
if (typeof host.type === 'undefined' || !host.type) {
|
||||
host.type = 'proxy';
|
||||
}
|
||||
|
||||
template = fs.readFileSync(__dirname + '/../templates/' + host.type + '.conf.ejs', {encoding: 'utf8'});
|
||||
let config_text = ejs.render(template, host);
|
||||
fs.writeFileSync(filename, config_text, {encoding: 'utf8'});
|
||||
resolve(true);
|
||||
|
||||
Reference in new issue
Block a user