Add catch-all vhosts config

This commit is contained in:
Greg Hellings
2022-04-11 09:38:00 -05:00
parent a82604f274
commit a7fe8a3532
2 changed files with 30 additions and 8 deletions
+9 -8
View File
@@ -1,12 +1,13 @@
{ config, pkgs, ... }:
{
imports = [
./networking.nix
./dnsmasq.nix
./home-assistant.nix
../../profiles/rpi4.nix
../../profiles/home.nix
];
networking.hostName = "2maccabees";
imports = [
./networking.nix
./dnsmasq.nix
./home-assistant.nix
./vhosts.nix
../../profiles/rpi4.nix
../../profiles/home.nix
];
networking.hostName = "2maccabees";
}
+21
View File
@@ -0,0 +1,21 @@
# Virtual hosts that don't seem to have any better place to live should go in here.
# There are others that are specific to their own purposese scattered about in the
# configuration in places where they more naturally live. This is more of a catchall
# for ones that do not have a better place to live
{ ... }:
{
services.nginx = {
enable = true;
# A proxy front-end for Syncthing
virtualHosts."dns.thehellings.lan" = {
locations = {
"/sync" = {
proxyPass = "http://127.0.0.1:8384";
proxyWebsockets = true;
};
};
serverAliases = [ "dns" ];
};
};
}