Add nextcloud to caddy
This commit is contained in:
parent
f469555599
commit
3b1dcf4709
3 changed files with 43 additions and 28 deletions
|
@ -4,8 +4,12 @@ korhonen.cc, *.korhonen.cc {
|
|||
resolvers 1.1.1.1
|
||||
}
|
||||
|
||||
header {
|
||||
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
|
||||
}
|
||||
|
||||
@homepage host korhonen.cc
|
||||
handle @homepage {
|
||||
handle @homepage {
|
||||
root * /var/www/korhonen.cc
|
||||
file_server
|
||||
}
|
||||
|
@ -69,11 +73,45 @@ korhonen.cc, *.korhonen.cc {
|
|||
|
||||
@umami host umami.korhonen.cc
|
||||
handle @umami {
|
||||
reverse_proxy umami:3000
|
||||
reverse_proxy umami:3000
|
||||
}
|
||||
|
||||
@nextcloud host cloud.korhonen.cc
|
||||
handle @nextcloud {
|
||||
encode gzip
|
||||
|
||||
# .htaccess / data / config / ... shouldn't be accessible from outside
|
||||
@forbidden {
|
||||
path /.htaccess
|
||||
path /data/*
|
||||
path /config/*
|
||||
path /db_structure
|
||||
path /.xml
|
||||
path /README
|
||||
path /3rdparty/*
|
||||
path /lib/*
|
||||
path /templates/*
|
||||
path /occ
|
||||
path /console.php
|
||||
}
|
||||
handle @forbidden {
|
||||
respond 404
|
||||
}
|
||||
|
||||
redir /.well-known/carddav /remote.php/dav 301
|
||||
redir /.well-known/caldav /remote.php/dav 301
|
||||
|
||||
root * /var/www/nextcloud
|
||||
php_fastcgi nextcloud:9000 {
|
||||
root /var/www/html
|
||||
# Tells nextcloud to remove /index.php from URLs in links
|
||||
env front_controller_active true
|
||||
}
|
||||
file_server browse
|
||||
}
|
||||
|
||||
# Fallback for unhandled domains
|
||||
handle {
|
||||
redir https://korhonen.cc/404.html
|
||||
redir https://korhonen.cc/404.html 301
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,11 +2,13 @@
|
|||
image = "slothcroissant/caddy-cloudflaredns"
|
||||
container_name = "caddy"
|
||||
restart = "unless-stopped"
|
||||
user = "82:82"
|
||||
ports = ["80:80", "443:443/tcp", "443:443/udp"]
|
||||
networks = ["proxy"]
|
||||
volumes = [
|
||||
"/docker/caddy/data:/data",
|
||||
"/docker/caddy/config:/config",
|
||||
"/docker/nextcloud:/var/www/nextcloud",
|
||||
"/var/www/korhonen.cc:/var/www/korhonen.cc",
|
||||
"/var/www/wkd:/var/www/wkd",
|
||||
"/var/www/index.korhonen.cc:/var/www/index.korhonen.cc",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue