Caddy webdav return custom xml?

1. The problem I’m having:

I’m using caddy with the webdav plugin(GitHub - mholt/caddy-webdav: WebDAV handler module for Caddy) to set up a webdav server. I want to serve several directories for example dir1, dir2, dir3. So when I visit /dir1 it should return the contents for dir1. When I visit /, it should display dir1, dir2, dir3. I know I can do it via symbolic links, but I’d like to do it via a custom xml file. I tried to return a custom xml file when I visit / and the returned xml file contained those three directories. But it won’t work. The webdav client simply gets empty folder and won’t show the dir1, dir2 and dir3.

2. Error messages and/or full log output:


3. Caddy version:


4. How I installed and ran Caddy:

I directly download the complied caddy binary file with the webdav plugin.

a. System environment:

windows 11

b. Command:

caddy run

c. Service/unit/compose file:


d. My complete Caddy config:

  order webdav before file_server

:2015 {
  root /dir1/* /path/to/dir1/
  root /dir2/* /path/to/dir2/
  root /* index.xml
  basicauth {
    user1 hashed_password

5. Links to relevant resources:

Probably best if you open an issue on that plugin’s repo. Sounds like a feature request.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.