more server stuff

This commit is contained in:
Till 2025-04-27 18:29:51 +02:00
parent 0d08c32077
commit bc5f851d3f
5 changed files with 63 additions and 11 deletions

View file

@ -32,10 +32,13 @@ in {
enable = true;
virtualHosts = {
"ktiu.net" = {
addSSL = true;
forceSSL = true;
enableACME = true;
locations."/" = {
return = "418 'Ich bin eine Teekanne.'";
return = "200 'This domain used for e-mail hosting only.'";
extraConfig = ''
add_header Content-Type text/plain;
'';
};
};
"${config.networking.fqdn}" = {
@ -45,7 +48,8 @@ in {
root = "/var/lib/acme/.challenges";
};
locations."/" = {
return = "301 http://${config.networking.domain}";
# return = "301 http://${config.networking.domain}";
return = "404";
};
};
};