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