38 lines
905 B
Caddyfile
38 lines
905 B
Caddyfile
{
|
|
acme_dns cloudflare <CLOUDFLARE KEY>
|
|
order cgi last
|
|
}
|
|
|
|
<DOMAIN>, *.<DOMAIN> {
|
|
uri path_regexp ^/static/ /public/
|
|
handle /.well-known/matrix/server {
|
|
respond "{\"m.server\": \"matrix.handmade.network:443\"}"
|
|
header Content-Type application/json
|
|
}
|
|
# Uncomment this ONLY FOR BETA!
|
|
# It disables all search engine indexing!
|
|
# If you do this on the real site you will destroy all the site's SEO!
|
|
# ONLY UNCOMMENT THIS IN BETA!
|
|
# handle /robots.txt {
|
|
# respond "User-agent: *
|
|
# Disallow: /
|
|
# "
|
|
# }
|
|
handle /public/* {
|
|
file_server {
|
|
root /home/hmn/hmn
|
|
}
|
|
header {
|
|
Access-Control-Allow-Origin *
|
|
Access-Control-Allow-Methods "GET, OPTIONS"
|
|
}
|
|
}
|
|
handle {
|
|
reverse_proxy localhost:9001
|
|
}
|
|
}
|
|
|
|
srv.<DOMAIN>:8888 {
|
|
cgi /deploy /home/hmn/hmn/server/deploy_hook.sh <BRANCH>
|
|
}
|