-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
CalDAV/CardDAV service discovery (.well-known) broken for packages and subdir installs #19801
Comments
cc @jnweiger |
Some docs for the .well-known URLs are provided here: https://doc.owncloud.org/server/8.1/admin_manual/issues/index.html#apple-ios but i think its better to solve this directly in the package. |
Good spotting! sed -i -e 's@ /\(remote\|public\)\.php@ /owncloud/\1.php@' -e 's@ \(remote\|public\)\.php@ owncloud/\1.php@' .htaccess @DeepDiver1975 are there more hardcoded routes like this? |
I think you could leave the default .htaccess but add a new rewrite for the .well-known into the main owncloud.conf like:
as shown in https://doc.owncloud.org/server/8.1/admin_manual/issues/index.html#apple-ios |
@RealRancor hmm, wouldn't owncloud.conf settings be overwritten by the .htaccess settings then? |
Mhhh, for that i don't have enough knowledge about Apache and .htaccess. But rewriting the .htaccess won't help as this is only valid for /var/www/owncloud or http://127.0.0.1/owncloud where the .well-known rewrites needs to be in place in the main server config for /var/www/html (e.g. on Ubuntu 14.04) or http://127.0.0.1 |
@jnweiger Thanks Just was testing the documented rewrites here. The two lines added there won't fix this issue. But moving them between:
like:
will show a correct rewrite:
But honestly i have no idea if this will break other stuff. |
https://www.linode.com/docs/websites/apache-tips-and-tricks/redirect-urls-with-the-apache-web-server |
The problem with the directory container is, that those rewrite would be only valid for:
where the redirect should happen an:
Please be aware that i don't know if this will cause issues with other vhosts or configs as my knowledge about Apache is very basic. |
Re-Reading your initial report, I am now unsure if we really should provide http://SERVER/.well-known/ Is'nt it sufficient to provide http://SERVER/owncloud/.well-known instead? |
Thats a really good question. Just found out that i have misread the http://sabre.io/dav/service-discovery/ linked above about the location of the .well-known Within the https://tools.ietf.org/html/rfc5785 there are only .well-known URLs defined at the root dir and the FAQ is describing why no .well-known URLs for subdirs are defined https://tools.ietf.org/html/rfc5785#appendix-B So currently i don't have an idea whats the best approach. |
The packages cannot make any reasonable attempt at the well known redirects, since there could already be stuff there. We should just put a note in the documentation that the user needs to set that up manually, if they want it. |
Thanks @Xenopathic that means, we try to fix something with packaging logic, that also does not work when installing from the archives. Then it is a wontfix on my side. Sorry. |
@jnweiger Agreed, this isn't the responsibility of the packages, since it affects the whole server. |
Absolutely fine with that so closing that for now. Maybe just https://doc.owncloud.org/server/8.1/admin_manual/issues/index.html#apple-ios needs to be put somewhere prominently within the Apache documentation instead of the issues? |
I've left behind a comment in owncloud.conf refering to the documentation. |
Thanks, that works for me. Ref for the doc part: owncloud-archive/documentation#1800 |
The owncloud.conf as of 9.0.1 doesn't contain the reference to the documentation anymore, and webdav still doesn't work out of the box |
Steps to reproduce
curl -i http://127.0.0.1/.well-known/carddav
curl -i http://127.0.0.1/owncloud/.well-known/carddav
http://127.0.0.1/remote.php/carddav/
Expected behaviour
A request to
curl -i http://127.0.0.1/.well-known/carddav
should redirect tohttp://127.0.0.1/owncloud/remote.php/carddav/
Actual behaviour
CalDAV/CardDAV service discovery is broken due to the 404 on
curl -i http://127.0.0.1/.well-known/carddav
There are currently three main problems here:
.well-known/caldav
and.well-known/carddav
URL should be at the root folder of the server according to http://sabre.io/dav/service-discovery/http://127.0.0.1/owncloud/
The text was updated successfully, but these errors were encountered: