caddy && owncloud9.1环境配置
kevin.Zhu 发布于:2018-4-21 17:12 分类:文摘 有 13 人浏览,获得评论 0 条
https://blog.csdn.net/neuldp/article/details/52232888
//Caddyfile my-owncloud-site.com { root owncloud log owncloud/access.log errors owncloud/access.log fastcgi / 127.0.0.1:9000 php { env PATH /bin } rewrite { r ^/index.php/.*$ to /index.php?{query} } # client support (e.g. os x calendar / contacts) redir /.well-known/carddav /remote.php/carddav 301 redir /.well-known/caldav /remote.php/caldav 301 # remove trailing / as it causes errors with php-fpm rewrite { r ^/remote.php/(webdav|caldav|carddav)(\/?)$ to /remote.php/{1} } rewrite { r ^/remote.php/(webdav|caldav|carddav)/(.+)(\/?)$ to /remote.php/{1}/{2} } # .htacces / data / config / ... shouldn't be accessible from outside rewrite { r ^/(?:\.htaccess|data|config|db_structure\.xml|README) status 403 } header / Strict-Transport-Security "15768000" }