Caldav and Carddav a (trivial) problem that has been going on for years. Why?

Hi Support and Friends everywhere!
I read many and many and many and many again post, here in Nextcloud (and Owncloud Forum in the past), where again many and many people writes for problems connecting to the instances Caldav and Carddav from NC (and OC).
This problem can be solved easily by inserting the correct parameters in .htaccess.
Why Owncloud a time and Nextcloud developers today have never faced and solved the problem?
Are there any reasons that escape me? Esoteric maybe?

How many hours have the extraordinary volunteers dedicated with all their answers to this problem?

with love :kissing_heart:


Can you please provide some more details about the connection issues you face, or link the topics where you did that already here or on ownCloud forum?

I am not facing any issues with it.

Only thing I can imaging:

  • If your Nextcloud instance runs in a sub directory of the web root, the rewrite rules within .htaccess are not correct, so those need to be added, pointing correctly to the subdir Nextcloud runs in, to the webserver/vhost config.
  • But note that .htaccess is designed to have Nextcloud in web root and currently there is no plan to change this depending on the actual relative path and it is not even possible, since this .htaccess is due to its location not called, if a client attempts to connect to the related .well-known URL.
  • And even without rewrite rules, clients can connect if you configure them to use the full URL to DAV endpoints, provided by the calendar/contacts app web UI.

Hi @MichaIng and thanks for your reply :slight_smile:

If you (not only you, but you all, can look into these countless support requests,
as you can see, most of them refer to services discovery problems.

This could be easily automated on installation process, why it is not done?

Thanks :slight_smile:


Read the next bullet point:

All DAV clients I know either require a full path or they will search in|caldav. If your Nextcloud instance is the webroot, it’s .htaccess rewrites these paths correctly. If your Nextcloud instance is within a sub directory of the webroot, then it’s .htaccess has no influence since it is not called due to it’s location. It would require an .htaccess in webroot, or better a webserver/vhost entry. But this is nothing Nextcloud can and want’s to do on install, due to it’s permission limits. It would be somehow a wrong setup, if a web application could/would placed/edited files outside of it’s directory (besides those explicitly configured: data and apps). An repository package could do that and most indeed do.

So as above, this can be not easily automated and it should not be. And it is a minor thing which is solved in every case by just taking the full Cal/CardDAV paths from the web UI anyway.

Non of the topics from your search results are from you, so you mean this is a “problem for years” just because users are asking for help to configure this regularly? This is the case for nearly every aspect of configuring any software on Linux, no matter if the steps are easy or hard or even required or should not be done. So this is no measure :wink:.

One in case, one just needs to read the official docs to find the solution:

  • Not the solution I would recommend (additional .htaccess file), but it works for Apache.

And for Nginx, the config from docs already contains the required rewrite rules: