feat: add static website

This commit is contained in:
Moritz Böhme 2025-05-16 09:57:24 +02:00
parent b714d906d8
commit d4e8bde4cd
No known key found for this signature in database
GPG key ID: 970C6E89EB0547A9
9 changed files with 110 additions and 11 deletions

View file

@ -1,4 +1,8 @@
{config, ...}: {
{
config,
lib,
...
}: {
services.fail2ban = {
enable = true;
bantime-increment.enable = true;
@ -63,17 +67,17 @@
forceSSL = true;
useACMEHost = "any.moritz.place";
locations."/" = {
extraConfig = ''
add_header Content-Type text/html;
'';
return = "200 '<html><body>Hello World</body></html>'";
return = "301 https://moritz.place";
};
};
"moritz.place" = {
forceSSL = true;
useACMEHost = "moritz.place";
locations."/" = {
return = "301 https://www.moritz.place";
locations."/" = lib.mkDefault {
extraConfig = ''
add_header Content-Type text/html;
'';
return = "200 '<html><body>Hello World</body></html>'";
};
};
"_" = {