flora-6: update Caddyfile, add missing pub.solar

config for www and mastodon well-known redirect
This commit is contained in:
teutat3s 2023-01-21 23:22:50 +01:00
parent f2c5739c97
commit 645b10f2b9
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1

View file

@ -15,8 +15,34 @@
output discard
'';
extraConfig = ''
root * /srv/www/pub.solar/
file_server
# PubSolarOS images
handle /os/download/* {
root * /srv/www
file_server /os/download/* browse
}
# serve base domain pub.solar for mastodon.pub.solar
# https://masto.host/mastodon-usernames-different-from-the-domain-used-for-installation/
handle /.well-known/host-meta {
redir https://mastodon.pub.solar{uri}
}
# pub.solar website
handle {
root * /srv/www/pub.solar
try_files {path}.html {path}
file_server
}
# minimal error handling, respond with status code and text
handle_errors {
respond "{http.error.status_code} {http.error.status_text}"
}
'';
};
"www.pub.solar" = {
logFormat = lib.mkForce ''
output discard
'';
extraConfig = ''
redir https://pub.solar{uri}
'';
};
"auth.pub.solar" = {