Webserver Konfiguration, well-known/caldav und well-known/carddav

Hallo,
mein Thema wurde bereits öfters behandelt, es gibt auch in den nextcloud documentations eine Anleitung. documentations nextcloud

Habe ich mir alles durchgelesen, verstehe es aber nicht.

Vielleicht kann mir jemand bei meinem Problem Schritt-für-Schritt helfen.

Ich habe nextcloud 18.01 auf einem raspberry pi 4 installiert.
webserver: Apache2, Version 7.3. 14
Datenbank: mysql, Vers. 10.3.22

meine nextcloud finde ich wenn ich in folgendes Verzeichnis wechsle:
cd /var/www/html/nextcloud/

laut den documentations soll ich nun in der .htaccess Datei im document root Web server einen Textblock einfügen.

  1. Frage: wo ist diese .htaccess-Datei? Ich habe eine .htaccess-Datei im nextcloud Verzeichnis gefunden: nano /var/www/html/nextcloud/.htaccess

Dort finden sich auch die entsprechenden Zeilen wie in der Dokumentation. Hier hatte ich dann auch mal versuchsweise entsprechend /nextcloud/ eingetragen.

Bsp: RewriteRule ^.well-known/host-meta /nextcloud/public.php?service=host-meta [QSA,L]

Und das bei allen 6 Zeilen. Aber ohne Erfolg.

Gibt es gibt noch eine weitere .htaccess in der document root des Web servers? Wenn ja, wie komme ich in dieses Verzeichnis?

Den nächsten Hinweis in der Dokumentation verstehe ich auch nicht: Make sure to change /nextcloud to the actual subfolder your Nextcloud instance is running in

Was muss ich hier machen?

Über eine einfache Erklärung bin ich sehr dankbar.

You have full control over your webserver, you dont’need .htaccess.

You can insert those lines in the actual virtualhost definition, assuming they aren’t there already. If the overview in the admin settings isn’t complaining some misconfiguration, they are there already and you have nothing to do.

Thank you for your answer!

I am not sure if I understood everything correctly.

My virtual host do I find with:
cd /etc/apache2/sites-available
nano 000-default.conf
Is that rigt?

Here I find this:

And now here I shoul insert the lines from the documentation?

Anmerkung%20Doku

In my overview settings I have follong remarks:

Ihr Webserver ist nicht richtig konfiguriert um “/.well-known/caldav” aufzulösen. Weitere Informationen hierzu finden Sie in der [Dokumentation]

And in tje protocoll I have following remarks:

Thank you!

It should be. Is that the only file in that directory?

Anywhere, but I’d say near the end before </VirtualHost>

unfortunately that didn’t work, the error messages are still there.

did you reload apache?

systemctl reload apache

and did you enable mod_rewrite? (before)

a2enmod rewrite

Yes I did reload apache and I did enable a2enmod rewrite.

In the documentation they say

Make sure to change /nextcloud to the actual subfolder your Nextcloud instance is running in

Maybe I do have to change something else?

I got it!

Look at snake29 in Beitrag 4

SOLUTION: Edit File: /etc/apache2/sites-enabled/default-ssl.conf Add lines between and : Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav Example: [image]

And further I added all the rewrite rules in etc/apache2/sites-enabled/000-default.conf
and not like I did before in the
etc/apache2/sites-available/000-default.conf

They are supposed to be the same file*. If they are not, something funny is going on, but if it work, all is well.

* = You write configs in sites-available and then you activate them with a2ensite which creates a symbolic link from the file in sites-available to the sites-enabled directory.

Thank you very much for yout help!