backyard: make pool servable and add mirror vhost
This commit is contained in:
parent
7fabf0b9a1
commit
21192f1b5a
|
@ -26,6 +26,28 @@
|
||||||
|
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
allowedTCPPorts = [
|
||||||
|
7474 # mirror revproxy
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx = {
|
||||||
|
enable = true;
|
||||||
|
virtualHosts = {
|
||||||
|
default = {
|
||||||
|
default = true;
|
||||||
|
rejectSSL = true;
|
||||||
|
locations."/".return = "444";
|
||||||
|
};
|
||||||
|
"mirror.backyard.home" = {
|
||||||
|
listen = [
|
||||||
|
{ addr = "10.22.20.8"; }
|
||||||
|
# Serve the mirror on a unique port to ensure the revproxy connects to the right vhost
|
||||||
|
{ addr = "10.22.20.8"; port = 7474; }
|
||||||
|
];
|
||||||
|
root = "/pool/tvb/doc/website/mirror";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
@ -56,6 +78,10 @@
|
||||||
|
|
||||||
users.groups = {
|
users.groups = {
|
||||||
katydid.gid = 1102;
|
katydid.gid = 1102;
|
||||||
|
tvbpoolro = {
|
||||||
|
gid = 1201;
|
||||||
|
members = [ "tvb" "nginx" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# This value governs how some stateful data, like databases, are handled
|
# This value governs how some stateful data, like databases, are handled
|
||||||
|
|
|
@ -243,6 +243,7 @@ in {
|
||||||
];
|
];
|
||||||
"10.22.20.8" = [
|
"10.22.20.8" = [
|
||||||
"backyard.home"
|
"backyard.home"
|
||||||
|
"mirror.backyard.home"
|
||||||
"jellyfin.home.ktvb.site"
|
"jellyfin.home.ktvb.site"
|
||||||
];
|
];
|
||||||
"10.22.20.9" = [
|
"10.22.20.9" = [
|
||||||
|
|
Loading…
Reference in New Issue