machine-config/bert/services/http/index.nix
Chandler Swift 3928a5b44d
bert: Rephrase site-not-found message
This gives me a bit of repudiability in case someone decides to point
someunsavorydomain.net at my server -- I don't want to automatically
respond indicating "yep, this is mine!"
2025-02-08 12:16:53 -06:00

61 lines
1.5 KiB
Nix

{
imports = [
./0hats.com.nix
./bannergen.chandlerswift.com.nix
./chandlerswift.com.nix
./files.chandlerswift.com.nix
./git.chandlerswift.com.nix
./harborpaperco.com.nix
./home.chandlerswift.com.nix
./isaacswift.com.nix
./katherineandchandler.com.nix
./lawrencedeerclub.chandlerswift.com.nix
./maps.chandlerswift.com.nix
./music.chandlerswift.com.nix
./preview.chandlerswift.com.nix
./social.chandlerswift.com.nix
./stjohnscccc.org.nix
./swiftgang.net.nix
./whereis.chandlerswift.com.nix
];
services.caddy = {
enable = true;
email = "chandler@chandlerswift.com";
globalConfig = ''
servers {
metrics # Enable Prometheus monitoring
}
'';
virtualHosts.":80" = {
serverAliases = [":443"];
extraConfig = ''
header Content-Type text/html
respond <<EOF
<!DOCTYPE html>
<html>
<head>
<title>not found - chandlerswift.com</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>not found - chandlerswift.com</h1>
<p>
You've reached a server at
<a href="https://chandlerswift.com/">chandlerswift.com</a>,
but the requested site couldn't be found.
</p>
</body>
</html>
EOF 404
'';
};
};
}