mirror of https://gitlab.crans.org/nounous/nixos
Configuration de anubis
parent
cae379f473
commit
6e9de7cab7
|
@ -4,9 +4,11 @@
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./networking.nix
|
./networking.nix
|
||||||
|
./reverseproxy.nix
|
||||||
|
|
||||||
../../../modules
|
../../../modules
|
||||||
../../../modules/services/acme.nix
|
../../../modules/services/acme.nix
|
||||||
|
../../../modules/services/anubis.nix
|
||||||
../../../modules/services/nginx.nix
|
../../../modules/services/nginx.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -14,27 +16,4 @@
|
||||||
boot.loader.grub.devices = [ "/dev/sda" ];
|
boot.loader.grub.devices = [ "/dev/sda" ];
|
||||||
|
|
||||||
system.stateVersion = "25.05";
|
system.stateVersion = "25.05";
|
||||||
|
|
||||||
users.users."nginx".home = "/var/lib/nginx";
|
|
||||||
|
|
||||||
services.nginx.virtualHosts = {
|
|
||||||
"install-party.crans.org" = {
|
|
||||||
enableACME = true;
|
|
||||||
forceSSL = true;
|
|
||||||
serverAliases = [
|
|
||||||
"i-p.crans.org"
|
|
||||||
"adopteunmanchot.crans.org"
|
|
||||||
"adopteunpingouin.crans.org"
|
|
||||||
"i-p.crans.fr"
|
|
||||||
"install-party.crans.fr"
|
|
||||||
"adopteunmanchot.crans.fr"
|
|
||||||
"adopteunpingouin.crans.fr"
|
|
||||||
"i-p.crans.eu"
|
|
||||||
"install-party.crans.eu"
|
|
||||||
"adopteunmanchot.crans.eu"
|
|
||||||
"adopteunpingouin.crans.eu"
|
|
||||||
];
|
|
||||||
root = "/var/www/install-party.crans.org";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
users.users."nginx".home = "/var/lib/nginx";
|
||||||
|
|
||||||
|
services.nginx.virtualHosts = {
|
||||||
|
# redirection install-party
|
||||||
|
"install-party.crans.fr" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
serverAliases = [
|
||||||
|
"i-p.crans.org"
|
||||||
|
"adopteunmanchot.crans.org"
|
||||||
|
"adopteunpingouin.crans.org"
|
||||||
|
"i-p.crans.fr"
|
||||||
|
"install-party.crans.fr"
|
||||||
|
"adopteunmanchot.crans.fr"
|
||||||
|
"adopteunpingouin.crans.fr"
|
||||||
|
"i-p.crans.eu"
|
||||||
|
"install-party.crans.eu"
|
||||||
|
"adopteunmanchot.crans.eu"
|
||||||
|
"adopteunpingouin.crans.eu"
|
||||||
|
];
|
||||||
|
extraConfig = ''
|
||||||
|
return 301 https://install-party.crans.org$request_uri;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# redirection anubis
|
||||||
|
"anubis" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:7777";
|
||||||
|
};
|
||||||
|
serverName = "install-party.crans.org";
|
||||||
|
};
|
||||||
|
|
||||||
|
# page install-party
|
||||||
|
"install-party.crans.org" = {
|
||||||
|
root = "/var/www/install-party.crans.org";
|
||||||
|
listen = [
|
||||||
|
{
|
||||||
|
addr = "localhost";
|
||||||
|
port = 8888;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.anubis = {
|
||||||
|
instances."muraille" = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
BIND_NETWORK = "tcp";
|
||||||
|
BIND = "127.0.0.1:7777";
|
||||||
|
TARGET = "http://localhost:8888";
|
||||||
|
COOKIE_DOMAIN = "crans.org";
|
||||||
|
REDIRECT_DOMAINS = "install-party.crans.org";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue