mholt / caddy-webdav

WebDAV handler module for Caddy
Apache License 2.0
198 stars 22 forks source link

How to have WebDAV server run under a subdirectory of a subdomain? #40

Open poperigby opened 6 months ago

poperigby commented 6 months ago

I'm having some trouble setting this up. I want:

How can I do this?

I tried this, but it didn't work:

drive.example.com {
    webdav /dav/* {
        root /srv/files
        prefix /dav
    }
}

It gives me a blank screen when I navigate to drive.example.com/dav.

mholt commented 6 months ago

Are you navigating in your browser, or a WebDAV client? What is the actual response from the server?

poperigby commented 6 months ago

I was navigating in my browser. When I just have this for my Caddyfile entry...

drive.example.com {
    webdav {
        root /srv/files
    }
}

...I get a white screen with this on it:

/Tue, 07 Nov 2023 17:35:43 GMTHTTP/1.1 200 OK

I'm getting a 200 response from the server. It actually doesn't seem to matter what subdirectory I navigate to under drive.example.com, it will always be a grey screen with a 200 response.

mholt commented 4 months ago

Do you need to wrap the webdav directive in a handle_path block? handle_path /dav/*