Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Uploading files: 404 Not found (but connecting works fine) #46

Open
JGStyle opened this issue Sep 16, 2024 · 2 comments
Open

Comments

@JGStyle
Copy link

JGStyle commented Sep 16, 2024

Hi, I set my config up according to the documentation:

webdav.my.domain.tld {
	root /home/example/webdav

	basic_auth {
		user $2a$14$myhash.ahlsdfkh.myhash.D9lvsasdl4EPF2xi
	}

	webdav

	log /etc/caddy/access-webdav.log
}

Connecting works fine

cadaver https://webdav.my.domain.tld
Authentication required for restricted on server `webdav.my.domain.tld':
Username: user
Password:

But uploading files does not work, resulting in 404!

dav:/> put ./test.md
Uploading ./test.md to `/test.md':
Progress: [=============================>] 100.0% of 153 bytes failed:
404 Not Found
Terminated by signal 2.
Connection to `webdav.my.domain.tld' closed.

Is it not supported or a misconfiguration on my side? The folder /home/example/webdav has access rights to allow everyone to read, write and execute

@heddxh
Copy link

heddxh commented Nov 1, 2024

Same here. On Arch Linux, caddy v2.8.4 built with latest commit of this module. get is also not working.
Sorry my problem is due to classical subffolder problem , not related to this issue.

@KaKi87
Copy link

KaKi87 commented Dec 31, 2024

Hi,

I'm experiencing the same issue (response status 404) but only on MOVE (GET & PUT work fine), when trying to install KeeWeb. I checked that the file it's trying to move exists and that it has permissions to move it.

Here's the Apache config I had :

<VirtualHost *:80>
    ServerName kw.kaki87.net
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>

<VirtualHost *:443>
    ServerName kw.kaki87.net
    DocumentRoot /var/www/kw.kaki87.net
    SSLCertificateFile /home/kaki/.acme.sh/kaki87.net/fullchain.cer
    SSLCertificateKeyFile /home/kaki/.acme.sh/kaki87.net/kaki87.net.key
</VirtualHost>

<Directory "/var/www/kw.kaki87.net/kdbx">
    DAV On
    Options Indexes
    AuthType Basic
    AuthName "KDBX"
    AuthUserFile "/home/kaki/www/kw.kaki87.net/.htpasswd"
    Require valid-user
</Directory>

Here's the Caddy config I made :

kw.kaki87.net {
    log
    root * /var/www/kw.kaki87.net
    route {
        basic_auth /kdbx/* {
            <username> <password>
        }
        webdav /kdbx/* {
            root /var/www/kw.kaki87.net/kdbx
            prefix /kdbx
        }
        file_server
   }
}

What am I missing ?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants