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

cal|carddav not setup properly (.htaccess) #528

Open
jkaberg opened this Issue Oct 27, 2018 · 4 comments

Comments

Projects
None yet
4 participants
@jkaberg
Copy link

jkaberg commented Oct 27, 2018

Running nextcloud:14.0.3 @ https://cloud.domain.tld/ (with Traefik as a reverse proxy in front)

From Settings->Administration->Overview

 There are some warnings regarding your setup.

    Your web server is not properly set up to resolve "/.well-known/caldav". Further information can be found in the documentation.
    Your web server is not properly set up to resolve "/.well-known/carddav". Further information can be found in the documentation.

The documentation can be found here.

Shouldn't this be working by default? The .htaccess file already contains these settings

@SnowMB

This comment has been minimized.

Copy link
Contributor

SnowMB commented Oct 31, 2018

I experienced the same warning, but everything seems to work as expected. (I also use traefik as reverse proxy).

I found an issue in the server repo that seems related: nextcloud/server#11850

Might be something with the schema, because if I curl .well-known/carddav it gives me http and not https.

➜  ~ curl -i https://DOMAIN/.well-known/caldav
HTTP/2 301 
content-type: text/html; charset=iso-8859-1
date: Wed, 31 Oct 2018 10:12:25 GMT
location: http://DOMAIN/remote.php/dav/
referrer-policy: strict-origin
server: Apache/2.4.25 (Debian)
strict-transport-security: max-age=31536000; includeSubdomains; preload
content-length: 325

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://DOMAIN/remote.php/dav/">here</a>.</p>
<hr>
<address>Apache/2.4.25 (Debian) Server at DOMAIN Port 80</address>
</body></html>

Will investigate further...

@SnowMB SnowMB added the help wanted label Oct 31, 2018

@SnowMB

This comment has been minimized.

Copy link
Contributor

SnowMB commented Oct 31, 2018

So this eliminates the warning:

Changing the .htaccess file to

...
  RewriteRule ^\.well-known/carddav https://DOMAIN/remote.php/dav/ [R=301,L]
  RewriteRule ^\.well-known/caldav https://DOMAIN/remote.php/dav/ [R=301,L]

...

But this is no solution for this image, since we are using the stock .htaccess file. 🤔

@funkypenguin

This comment has been minimized.

Copy link

funkypenguin commented Dec 12, 2018

Another Traefik user here..

I similarly changed:

  RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L]
  RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L]

To:

  RewriteRule ^\.well-known/carddav https://%{SERVER_NAME}/remote.php/dav/ [R=301,L]
  RewriteRule ^\.well-known/caldav https://%{SERVER_NAME}/remote.php/dav/ [R=301,L]

And now service discovery works on my iOS devices :)

D

@J0WI

This comment has been minimized.

Copy link
Contributor

J0WI commented Dec 12, 2018

This could be fixed with #527

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment