gerd.members-area: adds member website on <domain>/members
This commit is contained in:
parent
0ca49ba790
commit
23faf44b39
4 changed files with 153 additions and 6 deletions
|
@ -76,20 +76,22 @@ let
|
|||
error_page 401 =302 https://auth.fricloud.dk/?rd=$target_url;
|
||||
'';
|
||||
in {
|
||||
mine.shared.lib.authelia.mkProtectedWebsite = virtualHostConfig: lib.recursiveUpdate {
|
||||
mine.shared.lib.authelia.mkProtectedWebsite = { vhostConfig, endpoint ? "/" }: lib.recursiveUpdate {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
|
||||
extraConfig = "include ${autheliaLocation};";
|
||||
|
||||
locations."/" = {
|
||||
locations."${endpoint}" = {
|
||||
extraConfig = "include ${autheliaRequest};";
|
||||
};
|
||||
} virtualHostConfig;
|
||||
} vhostConfig;
|
||||
|
||||
services.nginx.virtualHosts."test.fricloud.dk" = config.mine.shared.lib.authelia.mkProtectedWebsite {
|
||||
locations."/".root = pkgs.writeTextDir "index.html" ''
|
||||
ACCESS GRANTED!
|
||||
'';
|
||||
vhostConfig = {
|
||||
locations."/".root = pkgs.writeTextDir "index.html" ''
|
||||
ACCESS GRANTED!
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue