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

Configure WebDAV Server #314

Closed
Na0mir opened this issue Aug 15, 2016 · 15 comments
Closed

Configure WebDAV Server #314

Na0mir opened this issue Aug 15, 2016 · 15 comments

Comments

@Na0mir
Copy link

Na0mir commented Aug 15, 2016

Hello!

Before kicking me out, I have to tell you that i read many times the wiki page about configuring WebDAV but I don't get it and it's still not working :'(

My config is a Synology Server with DSM 6.0.2 and Apache.
I created a file "httpd-cors.conf" in /usr/local/etc/httpd/site-enabled with this:

Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Headers "origin, content-type, accept, authorization, if-match, destination, overwrite"
Header always set Access-Control-Expose-Headers "ETag"
Header always set Access-Control-Allow-Methods "GET, HEAD, POST, PUT, OPTIONS, MOVE, DELETE, COPY, LOCK, UNLOCK"
Header always set Access-Control-Allow-Credentials "true"

RewriteEngine on
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ blank.html [R=200,L,E=HTTP_ORIGIN:%{HTTP:ORIGIN}]

But i still have "network error". Does my config is right ?

I also saw that my OPTIONS request return "401 Authorization Required"
Does anyone know if it's possible to enable it without authorization as asked on wiki page on Synology devices ?

Thanks

@Na0mir Na0mir closed this as completed Aug 15, 2016
@antelle
Copy link
Member

antelle commented Aug 16, 2016

If you create httpd conf, it won't work, you have to find the one Apache is using.
You can google 'Synology Apache httpd location' and try different results, something will work for you (e.g. http://www.synology-wiki.de/index.php/Apache_Webserver).

@Na0mir
Copy link
Author

Na0mir commented Aug 16, 2016

Synology overwrite custom config done in httpd.conf, but I have one config line "Include site-enabled/*.conf" in httpd.conf so it should include and load my file

Is there any VirtualHost / Location dedicated for WebDAV or is completly different ?

@antelle
Copy link
Member

antelle commented Aug 16, 2016

It's better to ask on Synology forums... I don't know

@waylonwang
Copy link

I have the same problem on DSM5.2, I think it might be to fix the problem that install an Apache or Nginx server in the docker to provide a new WebDAV services for keeweb

@antelle
Copy link
Member

antelle commented Oct 7, 2016

Yes, you can take existing docker container and customize it, e.g. make it inherit from nginx webdav, or apache webdav image. It should be pretty easy to do.

@alebupal
Copy link

alebupal commented Nov 9, 2017

Hello, I have the same problem
I have keeweb in a docker in synology 6.1.4 and I have this error ("network error"):
https://image.prntscr.com/image/2uTzaH4LQOC7IPvy9HhbBw.png
Is there any solution?

Thanks for the web application, it is very good!

@antelle
Copy link
Member

antelle commented Nov 9, 2017

@alebupal OPTIONS must work without authorization. I don't know how to configure synology thing though, probably makes sense to ask on some synology community.

@alebupal
Copy link

@antelle
Finally it works, I found the solution here -> #703 (comment)
Thanks to @Skad

@antelle
Copy link
Member

antelle commented Nov 10, 2017

Added a link to Wiki.

@keiranlovett
Copy link

I looked at solution #703 for a solution but still have 401 issues. Is this no longer working?

@alebupal
Copy link

Hi, I have it working now and it works perfectly.
There are several bears to consider:
1-. The webdav url that you have to put in must be https with the corresponding https port
2-. Enter in the webdav url that you are going to put, for example (https: // IP: PORT / prueba.kdbx) this will come out:

https://image.prntscr.com/image/EORkNN9eSXeqqeRxI2SiOQ.png (I use chrome)

Click on the link below to access.

This will ask for webdav username and password but you can close it.

the only thing that interested us was to remove the security message that chrome gives us.

This way you will take the file, try again to put the file in keeweb and it should work.

I suppose that if you do this with a ssl certificate you will not have this problem. As I access via vpn I do not use ssl

@keiranlovett
Copy link

I've set the httpd files on my NAS and I can see in the headers are update to match when I try to load a .kdbx file. If I input the url for the .kdbx in the browser I get the dialog box to input my credentials and it successfully downloads, if I try via KeeWeb and input the credentials I then get the 401 response header with WWW-Authenticate: Basic realm="SYNO_WebDAV Storage"

@alebupal
Copy link

It's very strange, I have it working.
As I have it in keeweb:
http://prntscr.com/j3p0gc
And the modifications of the files in WebDAVServer:
https://image.prntscr.com/image/B0T8NSHEQvOR-exzzf6xsA.png

@keiranlovett
Copy link

@alebupal are you using a Synology NAS for the webDAV server? If so what is the version? Mine is at: DSM 6.1.6-15266. My

Looking at your server settings in the above image some lines are different (outside of the redbox), that may also be causing this issue. Hrmmm

@alebupal
Copy link

@keiranlovett Ok, fantastic!
I have looked and in the capture there can be confusion because the route of the notebook is changed.
The correct image is:
https://prnt.sc/j3qdhq

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

5 participants