forked from pub-solar/os
flora-6: update Caddyfile, add missing pub.solar
config for www and mastodon well-known redirect
This commit is contained in:
parent
f2c5739c97
commit
645b10f2b9
|
@ -15,8 +15,34 @@
|
||||||
output discard
|
output discard
|
||||||
'';
|
'';
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
root * /srv/www/pub.solar/
|
# 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
|
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" = {
|
"auth.pub.solar" = {
|
||||||
|
|
Loading…
Reference in a new issue