-
-
Save tscs37/0649b61d77fd165599ecc477bfd5136a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
url.domain.invalid { | |
log /var/log/caddy/access.log { | |
rotate { | |
size 50 | |
age 30 | |
keep 5 | |
} | |
} | |
errors { | |
log /var/log/caddy/error.log { | |
size 50 | |
age 30 | |
keep 5 | |
} | |
} | |
tls nc.letsencrypt-ca@domain.invalid | |
maxrequestbody 500MB | |
root /var/www/nextcloud | |
#fastcgi / unix:/run/php/php7.0-fpm.sock php { | |
# env PATH /bin | |
# pool 1 | |
# connect_timeout 10s | |
# read_timeout 1m | |
# write_timeout 1m | |
#} | |
# Query Rewrite | |
rewrite { | |
r ^/index.php/.*$ | |
to /index.php?{query} | |
} | |
# Client Support CalDav | |
redir /.well-known/carddav /remote.php/carddav 301 | |
redir /.well-known/caldav /remote.php/caldav 301 | |
# DAV Rewrite | |
rewrite { | |
r ^/remote.php/(webdav|caldav|carddav)(\/?)$ | |
to /remote.php/{1} | |
} | |
rewrite { | |
r ^/remote.php/(webdav|caldav|carddav)/(.+)(\/?)$ | |
to /remote.php/{1}/{2} | |
} | |
# Protect Files | |
rewrite { | |
r ^/(?:\.htaccess|data|config|db_structure\.xml|README) | |
to /403-not-allowed | |
} | |
status 403 { | |
/403-not-allowed | |
} | |
header / Strict-Transport-Security "max-age=31536000;" | |
fastcgi / unix:/run/php/php7.0-fpm.sock php { | |
env PATH /bin | |
pool 1 | |
connect_timeout 10s | |
read_timeout 1m | |
write_timeout 1m | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment