DzzOffice的Caddy文件备份
本文最后更新于 1430 天前,其中的信息可能已经有所发展或是发生改变。
cloud.xyz.blue {
    #reverse_proxy * localhost:5212
    header {
        Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
    }
    root * /www/wwwroot/cloud.xyz.blue
    tls /etc/caddy/tls/xyz.blue/fullchain.pem /etc/caddy/tls/xyz.blue/privkey.pem
    php_fastcgi * 127.0.0.1:11172
    file_server

    @key0 {
     not file 
     path_regexp key0 'wopi\/files\/(\w+)\/contents(.*)' 
    }
    rewrite @key0 core/api/wopi/index.php?action=contents&path={re.key0.1}&{re.key0.2}
    @key1 {
     not file 
     path_regexp key1 'wopi\/files\/(\w+)\/(lock|unlock)(.*)' 
    }
    rewrite @key1 core/api/wopi/index.php?action={re.key1.2}&path={re.key1.1}&{re.key1.3}
    @key2 {
     not file 
     path_regexp key2 'wopi\/files\/(\w+)(.*)' 
    }
    rewrite @key2 core/api/wopi/index.php?path={re.key2.1}&{re.key2.2}
    @key3 {
     not file 
     path_regexp key3 'wopi\/files\/(.*)' 
    }
    rewrite @key3 core/api/wopi/index.php?{re.key3.1}
    @key4 {
     not file 
     path_regexp key4 'dingredirect\/(\w+)' 
    }
    rewrite @key4 index.php?mod=dingtalk&op=dingredirect&url={re.key4.1}


}
上一篇
下一篇