nixos/hosts/vm/reverseproxy/reverseproxy.nix

51 lines
1.1 KiB
Nix

{ ... }:
{
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;
}
];
};
};
}