Comments (8)
from caddy-webdav.
Is this?, I don't know golang.
{
http_port 8080
order webdav last
}
http:// {
root * /home/website
log {
output stdout
}
file_server
webdav /webdav/* {
prefix /webdav/
root /home/
}
}
from caddy-webdav.
The webdav config looks correct i think. Still not working?
from caddy-webdav.
Yes. website is good, webdav can not work.
from caddy-webdav.
What kind of error do you get? can you reproduce it with curl? maybe paste output?
You could try something like
curl -v -H "Depth: 1" -X PROPFIND http://host/webdav/
from caddy-webdav.
root@webdav:/etc/caddy# curl -v -H "Depth: 1" -X PROPFIND http://localhost:8080/webdav/
* Expire in 0 ms for 6 (transfer 0x563c53f50bb0)
* Expire in 1 ms for 1 (transfer 0x563c53f50bb0)
* Expire in 0 ms for 1 (transfer 0x563c53f50bb0)
* Expire in 2 ms for 1 (transfer 0x563c53f50bb0)
* Expire in 0 ms for 1 (transfer 0x563c53f50bb0)
* Expire in 0 ms for 1 (transfer 0x563c53f50bb0)
* Expire in 2 ms for 1 (transfer 0x563c53f50bb0)
* Expire in 0 ms for 1 (transfer 0x563c53f50bb0)
* Expire in 0 ms for 1 (transfer 0x563c53f50bb0)
* Expire in 2 ms for 1 (transfer 0x563c53f50bb0)
* Expire in 0 ms for 1 (transfer 0x563c53f50bb0)
* Expire in 0 ms for 1 (transfer 0x563c53f50bb0)
* Expire in 2 ms for 1 (transfer 0x563c53f50bb0)
* Expire in 0 ms for 1 (transfer 0x563c53f50bb0)
* Expire in 0 ms for 1 (transfer 0x563c53f50bb0)
* Expire in 2 ms for 1 (transfer 0x563c53f50bb0)
* Expire in 0 ms for 1 (transfer 0x563c53f50bb0)
* Expire in 0 ms for 1 (transfer 0x563c53f50bb0)
* Expire in 0 ms for 1 (transfer 0x563c53f50bb0)
* Trying 127.0.0.1...
* TCP_NODELAY set
* Expire in 149999 ms for 3 (transfer 0x563c53f50bb0)
* Expire in 200 ms for 4 (transfer 0x563c53f50bb0)
* Connected to localhost (127.0.0.1) port 8080 (#0)
> PROPFIND /webdav/ HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.64.0
> Accept: */*
> Depth: 1
>
< HTTP/1.1 404 Not Found
< Server: Caddy
< Date: Mon, 13 Jul 2020 14:31:56 GMT
< Content-Length: 0
<
* Connection #0 to host localhost left intact
from caddy-webdav.
I could be that your root * /home/website
directive "shadows" your webdav
directive because it both matches the same routes and also will be evaluated first i think. Try something like this:
{
http_port 8080
order webdav last
}
http:// {
route /webdav/* {
webdav {
prefix /webdav/
root /home/
}
}
route /* {
root /home/website
file_server
}
log {
output stdout
}
}
You could probably also use the order
directive to specify evaluation order.
from caddy-webdav.
(Sorry, been away from work stuff this weekend)
@cnkmmk Yes, the file_server
is being executed first because you have order webdav last
, so the file server is handling the request before it even gets to webdav.
I wrote about this in-depth here in this wiki article: https://caddy.community/t/composing-in-the-caddyfile/8291?u=matt - I encourage a thorough study of its concepts! It will make everything much easier and crystal clear. @wader's solution, as you will notice after reading the wiki article, might be one possible solution, although I think I would rather use handle
instead of route
so that both don't get executed. If you use route
, you would put them all inside one route
. (Also, I would drop the /*
matcher, it is unnecessary.)
Fortunately, this is not a bug in webdav, nor in Caddy, so I will close this, but feel free to continue discussion if necessary.
from caddy-webdav.
Related Issues (20)
- How to use webdav on caddy docker HOT 3
- 405 Method not allowed on default configuration HOT 3
- Is it possible to have directory listing with WebDAV enabled in the same path? HOT 3
- Permission/Path issues with webdav-module using systemd service
- Can you add the modify option like cdday-v1-webdav? It can achieve read-only access HOT 1
- can not use xcaddy build caddy v2.4.3 with webdav HOT 3
- Every time you use webdav to sync photos, an error will be reported, HOT 2
- encoded url can escape path limit HOT 4
- Excuse me, how to set different permissions under multiple users? HOT 8
- HEAD requests should work also on folders HOT 1
- Can not upload large file HOT 2
- The webdav service filter some files for unknown reason HOT 3
- Issue with webdav RANGE requests HOT 3
- FR: hide option HOT 1
- CF HOT 3
- Webdav with Jetbrains Rider, Caddy and ASP NET Core Umbraco CMS HOT 7
- TLS and Webdav client HOT 1
- LOCK/UNLOCK and other Webdav method support HOT 5
- root directive appears to ignore {http.auth.user.id}
- How to have WebDAV server run under a subdirectory of a subdomain? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from caddy-webdav.