mirror of https://gitlab.crans.org/nounous/nixos
54 lines
1.1 KiB
Nix
54 lines
1.1 KiB
Nix
{ config, ... }:
|
|
|
|
{
|
|
services.nginx.virtualHosts = {
|
|
# redirection eclat
|
|
"eclat.crans.fr" = {
|
|
rejectSSL = true;
|
|
serverAliases = [
|
|
"eclat.crans.eu"
|
|
];
|
|
extraConfig = ''
|
|
return 301 http://eclat.crans.org$request_uri;
|
|
'';
|
|
};
|
|
|
|
# redirection mirror
|
|
"mirror.crans.fr" = {
|
|
rejectSSL = true;
|
|
serverAliases = [
|
|
"mirror.crans.eu"
|
|
];
|
|
extraConfig = ''
|
|
return 301 http://mirror.crans.org$request_uri;
|
|
'';
|
|
};
|
|
|
|
# redirection anubis mirrors
|
|
"anubis-mirror" = {
|
|
rejectSSL = true;
|
|
locations."/" = {
|
|
proxyPass = "http://${config.services.anubis.instances."mirror".settings.BIND}";
|
|
};
|
|
serverName = "mirror.crans.org";
|
|
serverAliases = [
|
|
"eclat.crans.org"
|
|
];
|
|
};
|
|
|
|
# mirror
|
|
"mirror.crans.org" = {
|
|
locations."/".proxyPass = "http://172.16.10.104";
|
|
listen = [
|
|
{
|
|
addr = "localhost";
|
|
port = 8890;
|
|
}
|
|
];
|
|
serverAliases = [
|
|
"eclat.crans.org"
|
|
];
|
|
};
|
|
};
|
|
}
|