Init www for pub.solar and pub.solar/os

This commit is contained in:
teutat3s 2022-06-04 20:50:31 +02:00
parent 93491039a0
commit 3384054508
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1

38
www/caddy/Caddyfile Normal file
View file

@ -0,0 +1,38 @@
# Caddy's configuration file
# see: https://caddyserver.com/docs/caddyfile
{
email admins@pub.solar
}
pub.solar {
log {
output stderr
}
# PubSolarOS images
handle /os/* {
root * /srv
file_server /os/* 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/pub.solar
try_files {path}.html {path}
file_server
}
handle_errors {
respond "{http.error.status_code} {http.error.status_text}"
}
}
www.pub.solar {
redir https://pub.solar{uri}
}