machine-config/bert/services/http/harborpaperco.com.nix
Chandler Swift 9e3c4ee13e
bert: Add handle_errors clause to all sites
It looks like this was CLOSED WONTFIX: How can we _possibly_ know that
upon an error, the developer might want us to send an indication of that
error??!!1! Snark aside (mine and his): it looks like there's not a
great way to enable sane error behavior globally :/

https://caddy.community/t/handling-errors-globally/17174/2

In the future, I should probably make this a snippet or something.
2024-11-12 10:56:03 -06:00

27 lines
629 B
Nix

{
services.caddy.virtualHosts."harborpaperco.com" = {
serverAliases = ["www.harborpaperco.com"];
extraConfig = ''
encode zstd gzip
file_server
root * /srv/www/harborpaperco.com
handle_errors {
respond "{err.status_code} {err.status_text}"
}
'';
};
# services.caddy.virtualHosts."pureserendipityweddings.com" = {
# serverAliases = ["www.pureserendipityweddings.com"];
# extraConfig = ''
# redir https://harborpaperco.com
# '';
# };
systemd.tmpfiles.settings."10-harborpaperco-com" = {
"/srv/www/harborpaperco.com" = {
d = {};
};
};
}