VEGAS: add websites
This commit is contained in:
parent
9b8f43fa28
commit
7d00d872ae
3 changed files with 30 additions and 0 deletions
5
hosts/VEGAS/services/websites/default.nix
Normal file
5
hosts/VEGAS/services/websites/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{ config, lib, tools, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.nginx.virtualHosts = tools.nginx.mappers.mapSubdomains (import ./websites.nix { tools = tools.nginx; });
|
||||||
|
}
|
24
hosts/VEGAS/services/websites/websites.nix
Normal file
24
hosts/VEGAS/services/websites/websites.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{ tools }:
|
||||||
|
with tools.vhosts;
|
||||||
|
let inherit (tools) domain; in
|
||||||
|
{
|
||||||
|
# websites
|
||||||
|
ktp = static "/srv/storage/www/soda/ktp";
|
||||||
|
legacy = static "/srv/storage/www/legacy";
|
||||||
|
soda = static "/srv/storage/www/soda"; # TODO: add back custom error pages, wttr.in cache
|
||||||
|
www = simplePHP "/srv/storage/www/${domain}" // { default = true; };
|
||||||
|
|
||||||
|
"shadertool.dev" = proxy "http://test-generic.int.${domain}";
|
||||||
|
"kokaido" = proxy "http://test-generic.int.${domain}:8080";
|
||||||
|
|
||||||
|
# content delivery
|
||||||
|
autoconfig = static "/srv/storage/www/autoconfig";
|
||||||
|
rpm = static "/srv/storage/rpm";
|
||||||
|
|
||||||
|
"whoami".locations = { # no tls
|
||||||
|
"/".return = ''200 "$remote_addr\n"'';
|
||||||
|
"/online".return = ''200 "CONNECTED_GLOBAL\n"'';
|
||||||
|
};
|
||||||
|
|
||||||
|
top-level = redirect "https://www.${domain}$request_uri" // { serverName = domain; };
|
||||||
|
}
|
|
@ -27,6 +27,7 @@
|
||||||
./services/nfs
|
./services/nfs
|
||||||
./services/mail
|
./services/mail
|
||||||
./services/warehouse
|
./services/warehouse
|
||||||
|
./services/websites
|
||||||
]
|
]
|
||||||
# TODO: fix users
|
# TODO: fix users
|
||||||
# ++ (import ../../users "server").groups.admin
|
# ++ (import ../../users "server").groups.admin
|
||||||
|
|
Loading…
Reference in a new issue