feat: fw add moltbot
This commit is contained in:
@@ -103,4 +103,31 @@
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."moltbot.cloonar.com" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
acmeRoot = null;
|
||||
|
||||
# Restrict to internal networks only (LAN + VPN)
|
||||
extraConfig = ''
|
||||
allow ${config.networkPrefix}.96.0/24;
|
||||
allow ${config.networkPrefix}.97.0/24;
|
||||
allow ${config.networkPrefix}.98.0/24;
|
||||
deny all;
|
||||
'';
|
||||
|
||||
locations."/" = {
|
||||
proxyPass = "http://${config.networkPrefix}.97.60:18789";
|
||||
extraConfig = ''
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user