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

Configuring Baikal Server on Windows 10 IIS 10 #448

Closed
inow24 opened this issue Feb 10, 2016 · 20 comments
Closed

Configuring Baikal Server on Windows 10 IIS 10 #448

inow24 opened this issue Feb 10, 2016 · 20 comments
Labels

Comments

@inow24
Copy link

inow24 commented Feb 10, 2016

Hi Everyone,

We have been trying to configure Baikal server on a Windows 10 IIS 10 server for a while now, and would appreciate some help to get it working correctly!

We will be using CalDAV backend configuration. So far have installed PHP 5.6.16 and IIS PHP Manager, and the web admin works fine and we can register new users successfully.

However, when we try to connect to the calendar using a client, it returns a "404 Not Found" error. If we try to connect to the calendar using a browser, we can see that the calendar is up and running. The URL we use to connect to the calendar is (website is configured on port 8181):
http://10.8.0.122:8181/cal.php/calendars/user1@test.com/default

So can you guys please help to find possible issues here?

Thank you.

@evert evert added the bug label Feb 10, 2016
@evert
Copy link
Member

evert commented Feb 10, 2016

Are you able to navigate to:

http://10.8.0.122:8181/cal.php/calendars/user1@test.com/default

Using a browser?

@inow24
Copy link
Author

inow24 commented Feb 11, 2016

Yes we are able to navigate to that URl. Once we do, we are asked for authentication. Once we enter username and password we see this:

<d:error><s:exception>Sabre\DAV\Exception\NotImplemented/s:exception<s:message>GET is only implemented on File objects/s:message<s:sabredav-version>1.8.7/s:sabredav-version/d:error

@evert
Copy link
Member

evert commented Feb 11, 2016

That's a good sign already. Some more questions:

  1. What client are you using to connect?
  2. What URL are you using within that client to connect?
  3. Are you using Digest or Basic auth?
  4. Can you share a bit of your log files, in particular from when it's going wrong?

@inow24
Copy link
Author

inow24 commented Feb 11, 2016

  1. I have tried with Thunderbird and EM client. Thunderbird shows a disabled calendar and EM client shows and error saying:

10:32:42 AM user1@test.com [CalDAV / CardDAV] MailExceptions.OperationException: Subfolder synchronization for folder "user1@test.com" failed due to the following error: Not Found

Aside from these clients we wrote a C# client to send HTTP request and we received 404 not found as well. Same Client works with Baikal when installed on Linux.

  1. This is the URL we use (This works with Baikal on Linux):
    http://10.8.0.122:8181/cal.php/calendars/user1@test.com/default/

3)Previously we used Digest but using Basic auth also we have the same result.

  1. Thunderbird says:
    CalDAV: Status 404 on initial PROPFIND for calendar test

This is the IIS log for em client connection:

#Software: Microsoft Internet Information Services 10.0
#Version: 1.0
#Date: 2016-02-11 02:36:49
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2016-02-11 02:36:49 10.8.0.122 OPTIONS /cal.php/calendars/user1@test.com/default/ - 8181 - 10.8.0.122 eM+Client/6.0.24432.0 - 200 0 0 3
2016-02-11 02:36:49 10.8.0.122 PROPFIND /cal.php/calendars/user1@test.com/default/ - 8181 - 10.8.0.122 eM+Client/6.0.24432.0 - 404 0 2 1
2016-02-11 02:36:49 10.8.0.122 REPORT /cal.php/calendars/user1@test.com/default/ - 8181 - 10.8.0.122 eM+Client/6.0.24432.0 - 404 0 2 0
2016-02-11 02:36:49 10.8.0.122 OPTIONS /cal.php/calendars/user1@test.com/default/ - 8181 - 10.8.0.122 eM+Client/6.0.24432.0 - 200 0 0 0
2016-02-11 02:36:49 10.8.0.122 PROPFIND /cal.php/calendars/user1@test.com/default/ - 8181 - 10.8.0.122 eM+Client/6.0.24432.0 - 404 0 2 0
2016-02-11 02:36:49 10.8.0.122 PROPFIND /cal.php/calendars/user1@test.com/default/ - 8181 - 10.8.0.122 eM+Client/6.0.24432.0 - 404 0 2 0

@evert
Copy link
Member

evert commented Feb 11, 2016

I am thinking IIS is interfering with the WebDAV methods. Is there a setting somewhere in IIS that allows you to perhaps:

  1. Turn off IIS built-in WebDAV. IIS must not be allowed to handle webdav methods itsef.
  2. Edit a whitelist of allowed HTTP methods, or a list of HTTP methods PHP is allowed to handle.

@evert
Copy link
Member

evert commented Feb 11, 2016

Here's some more information that might help. I'm super unfamiliar with IIS so I'm just guessing here:

http://stackoverflow.com/questions/6739124/iis-7-5-enable-put-and-delete-for-restful-service-extensionless

@inow24
Copy link
Author

inow24 commented Feb 11, 2016

Thanks for your help Evert but I can confirm that WebDev is not installed on my IIS.

@evert
Copy link
Member

evert commented Feb 11, 2016

It's called 'WebDAV' in case you looked for the wrong thing. Did you read that link as well?

@inow24
Copy link
Author

inow24 commented Feb 11, 2016

Yeah I checked WebDav. And also i whiteliated those calls such as PUT, Head , ...

@evert
Copy link
Member

evert commented Feb 11, 2016

Well you need more than that! There's PROPFIND, 'PROPPATCH,REPORT` and others. Whitelist everything.

@inow24
Copy link
Author

inow24 commented Feb 11, 2016

Dear Evert,
I have added the following verbs :
GET, HEAD, PUT, DELETE, POST, PROPFIND, PROPPATCH,MOVE,NOTIFY,SEARCH,SUBSCRIBE,
UNLOCK,UNSUBSCRIBE,POLL,X-MS-ENUMATTS

Still I am getting the same result

@evert
Copy link
Member

evert commented Feb 11, 2016

I don't see REPORT in that list!

@inow24
Copy link
Author

inow24 commented Feb 11, 2016

That one is also added but same result.

@evert
Copy link
Member

evert commented Feb 11, 2016

In that case, do you have an error log? Maybe IIS has some information about why it rejects the requests.

@inow24
Copy link
Author

inow24 commented Feb 12, 2016

The only errors I can see are these:

2016-02-12 00:58:41 10.8.0.122 PROPFIND /cal.php/calendars/user1@test.com/default/ - 8181 - 10.8.0.122 Mozilla/5.0+(Windows+NT+10.0;+WOW64;+rv:38.0)+Gecko/20100101+Thunderbird/38.5.1+Lightning/4.0.5.2 - 404 0 2 182

2016-02-12 01:01:03 10.8.0.122 PROPFIND /cal.php/calendars/user1@test.com/default/ - 8181 - 10.8.0.122 Mozilla/5.0+(Windows+NT+10.0;+WOW64;+rv:38.0)+Gecko/20100101+Thunderbird/38.5.1+Lightning/4.0.5.2 - 404 0 2 0

@evert
Copy link
Member

evert commented Feb 12, 2016

That's just the access log. I imagine that IIS also produces an error log with other messages?

@evert
Copy link
Member

evert commented Feb 12, 2016

Here's another person running into an issue with IIS and a potential solution:

owncloud/core#1210 (comment)

I'm basically just trying to google for you =) I hope it helps

@evert
Copy link
Member

evert commented Feb 12, 2016

I also wonder if you could try to do this with a username that does not contain the @ symbol.

@inow24
Copy link
Author

inow24 commented Feb 12, 2016

Dear Evert.
This page https://forum.owncloud.org/viewtopic.php?f=3&t=2171&start=10#p7531

from the link that you provided to me helped me.
Now its working.

Thank you so very much for your time and support.

@inow24 inow24 closed this as completed Feb 12, 2016
@DoCheckor
Copy link

Don't kill me for reviving this topic...
The linked resources of this topic to help getting Baikal work on recent Windows IIS have vanished, so I am putting my 5 cents in as there does not seem to be ANY explanation left on the internet on how to get Baikal working on Windows with IIS.

You need to uninstall the WebDAV feature for IIS (look for Windows Features - WWWservices - common - WebDAV or in Server Roles - depending on the OS version - just search the internet for it)

HTTP verbs:
You CAN'T put in the verbs in the "Request Filtering" --> HTTP VERBS section! Instead - for PHP ISAPI you need to add them like this:

In ISS manager navigate to your site / sub-dir where baikal is installed
On the right hand pane open "Handler Mappings"
Make sure there is no other "WebDAV" handler or anything active containing any of the verbs below in the handler name.
Make sure there is only one PHP-related handler assigned
Double click it - continue to"Request Restrictions"
Check "File and Folder"
Continue to tab "Verbs" - add the following:
GET, HEAD, PUT, DELETE, POST, PROPFIND, PROPPATCH, MOVE, NOTIFY, SEARCH, SUBSCRIBE, UNSUBSCRIBE, LOCK, UNLOCK, REPORT, OPTIONS, MKCOL, COPY
Save / close - confirm the prompt about module assignment by YES

Forget about the Apache Auth rewrite stuff on IIS if you thought this to be an issue! Don't try adding that to your web.config!
Just make sure in "Authentication" (in IIS manager - for your baikal directory) - you got "Anonymous Authentication" set as the ONLY active option.

In your web.config make sure you got this (merge this with your existing file and make sure to adjust the path to match your own baikal installation):

Took me days to migrate from 0.2.7 on PHP 5.4.45 to Baikal 0.8 so I thought I'd share this with you guys!

Thanks to the dev team to keep this stuff alive!

Cheers!

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

No branches or pull requests

3 participants