Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

nginx config: Fix Windows WebDav client error 0x80070043 #2668

Closed
wants to merge 6 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions admin_manual/installation/nginx_examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ your nginx installation.
error_page 403 /core/templates/403.php;
error_page 404 /core/templates/404.php;

# Fixes Windows WebDav client error 0x80070043 "The network name cannot be found."
location = / {
if ($request_method = OPTIONS) {
return 301 $scheme://$server_name/remote.php/webdav/;
Copy link

@ghost ghost Nov 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be /remote.php/dav for oC9+

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We talking about WebDav - just files access, not calendar, address book and etc. Even official OC desktop client use /remote.php/webdav/

Copy link

@ghost ghost Nov 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the official endpoint since oC9 (for which you have created the PR here). Sync clients still using remote.php/webdav because they still need to support oC8.2 and below. Once oC8.2 is end-of-life the sync client will switch to remote.php/dav

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, now I saw it. Why, then, in the web-interface link with webdav in it?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are in the mid of changing this for oC9.2: owncloud/core#23904

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, in this situation it does not matter - we just should redirect DavClnt somwhere, where server returns 401 Unauthorized code... Hmm.. and what if we will not send 301 Redirect, but 401 Unauthorized at once?
I just test it out and it works! Think it is better solution

}
}

location / {
rewrite ^ /index.php$uri;
}
Expand Down