mirror of https://gitlab.crans.org/nounous/nixos
Small reverseproxy fixes
parent
4e83b11d22
commit
0af3d1071c
|
|
@ -176,10 +176,7 @@ in
|
|||
httpOnly = true;
|
||||
proxyPass = "172.16.10.104";
|
||||
};
|
||||
"nekorale" = {
|
||||
anubisConfig = "${anubisAllowOther}";
|
||||
globalRedirect = "172.16.10.31/club-nekorale";
|
||||
};
|
||||
"nekorale".globalRedirect = "172.16.10.31/club-nekorale";
|
||||
"perso" = {
|
||||
anubisConfig = "${anubisPerso}";
|
||||
proxyPass = "172.16.10.31";
|
||||
|
|
@ -187,10 +184,7 @@ in
|
|||
"clubs"
|
||||
];
|
||||
};
|
||||
"snl" = {
|
||||
anubisConfig = "${anubisAllowOther}";
|
||||
globalRedirect = "172.16.10.31/sonetlumens";
|
||||
};
|
||||
"snl".globalRedirect = "172.16.10.31/sonetlumens";
|
||||
"wiki" = {
|
||||
anubisConfig = "${anubisChallenge}";
|
||||
proxyPass = "172.16.10.161";
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ in
|
|||
};
|
||||
|
||||
proxyPass = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Indique la destination à proxy.
|
||||
'';
|
||||
|
|
@ -75,7 +75,7 @@ in
|
|||
};
|
||||
|
||||
serveLocalFiles = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
description = ''
|
||||
Chemin vers un dossier à exposer statiquement.
|
||||
|
|
@ -232,7 +232,7 @@ in
|
|||
# Configuration du service à proxy.
|
||||
"${vhostName}" = vhostExtraConf // {
|
||||
serverName = "${vhostName}.crans.${mainTld}";
|
||||
locations."/" = mkIf (vhostConfig.proxyPass != "") {
|
||||
locations."/" = mkIf (vhostConfig.proxyPass != null) {
|
||||
proxyPass = "http://${vhostConfig.proxyPass}";
|
||||
proxyWebsockets = vhostConfig.proxyWebsockets;
|
||||
};
|
||||
|
|
@ -242,16 +242,16 @@ in
|
|||
|
||||
# Entrée d’Anubis
|
||||
"${vhostName}-anubis" = mkIf (vhostConfig.anubisConfig != null) entryExtraConf // {
|
||||
serverName = "${vhostName}.crans.${mainTld}";
|
||||
locations."/" = {
|
||||
proxyPass = "http://unix:/run/anubis/anubis-${vhostName}/socket.sock";
|
||||
proxyWebsockets = vhostConfig.proxyWebsockets;
|
||||
};
|
||||
extraConfig = entryExtraConf.extraConfig + ''
|
||||
access_log /var/log/nginx/anubis.access.log;
|
||||
error_log /var/log/nginx/anubis.error.log;
|
||||
'';
|
||||
};
|
||||
serverName = "${vhostName}.crans.${mainTld}";
|
||||
};
|
||||
}
|
||||
# Les alias
|
||||
// lib.mergeAttrsList (
|
||||
|
|
|
|||
Loading…
Reference in New Issue