machine-config/bert/services/http/index.nix

54 lines
1.3 KiB
Nix

{
imports = [
./0hats.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
./stjohnscccc.org.nix
./swiftgang.net.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>This page is hosted with <a href="https://chandlerswift.com/">chandlerswift.com</a>,
but the site couldn't be found.</p>
</body>
</html>
EOF 404
'';
};
};
}