Redirect korrekt konfigurieren

Moin,

ich habe eine Frage bezüglich der Ersteinrichtung und Konfiguration vom Nextcloud Server.

Nach einer frischen Installation zeigt die Nextcloud 3 Probleme an.

“hsts” konnte ich Easy in der UCR (Registry in System) lösen.

Diese hier sind nun aber übrig geblieben:

Dein Web-Server ist nicht richtig eingerichtet um “/.well-known/caldav” aufzulösen. Weitere Informationen findest Du in der [Dokumentation]
Dein Web-Server ist nicht richtig eingerichtet um “/.well-known/carddav” aufzulösen. Weitere Informationen findest Du in der [Dokumentation]

Ich habe nun versucht, mit der .htaccess im Documentroot der Cloud zu arbeiten, in dem Fall “/var/lib/univention-appcenter/apps/nextcloud/data/nextcloud-data/.htaccess”

Dort habe ich, wie in der Dokumentation empfohlen, die Einträge eingefügt.

Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav
Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav

Das hat leider nicht geklappt. Ob ich nun einmal, oder in jeder Sparte der .htaccess die Einträge ergänzt habe, hat nichts geändert.

# Generated by Nextcloud on 2018-10-23 18:37:06
# line below if for Apache 2.4
Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav
Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav
<ifModule mod_authz_core.c>
Require all denied
</ifModule>

# line below if for Apache 2.2
Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav
Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav
<ifModule !mod_authz_core.c>
deny from all
Satisfy All
</ifModule>

# section for Apache 2.2 and 2.4
Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav
Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav
<ifModule mod_autoindex.c>
IndexIgnore *
</ifModule>

Dann hatte ich versucht, das mit Rewrite Regeln zu ändern. Hat leider auch keine Lösung herbeitgebracht.

# Generated by Nextcloud on 2018-10-23 18:37:06
# line below if for Apache 2.4
<IfModule mod_rewrite.c>
RewriteEngine on

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

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

<ifModule mod_authz_core.c>
Require all denied
</ifModule>

# line below if for Apache 2.2
<ifModule !mod_authz_core.c>
deny from all
Satisfy All
</ifModule>

# section for Apache 2.2 and 2.4
<ifModule mod_autoindex.c>
IndexIgnore *
</ifModule>

Auf meinem Produktivsystem habe ich aktuell einfach in den Templates den Redirect hinzugefügt. Dies erzeugt bei Upgrades regelmäßig Fehler, die ich über einen Regeintrag akzeptieren soll. Das würde ich gern in Zukunft unterlassen.

Kann mir jemand eine Lösung zeigen, die ich durchführen kann und die von dauerhafter Natur ist?

Grüße

Corin

this has been answered in Nextcloud 13.0.7 in the past

I dont see any Solution in the linked Thread

No, not a solution but a statement from the app developer that the given error messages are because of a change in nextcloud and he wants to properly resolve it for the version 14 update.

yes, but i need a Solution or workaround for now. I dont know, which configuration works in apache withourt troubles.

On my last Server i edited the default-ssl.conf on apache. The problem is, after Restart, the config is resetted.

You can add a file /var/www/.htaccess with the following content:

Redirect /.well-known/carddav /nextcloud/remote.php/dav
Redirect /.well-known/caldav /nextcloud/remote.php/dav
Mastodon