• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Nextcloud and Problems with .htaccess

fguzkhjbgvkmuv

New Pleskian
Hello,

i started using Plesk on my ubuntu 20.04 Server just for Mail server, Nextcloud and a blog. I hoped it would make the things a bit easier but i have now quite some troubles to get a nextcloud working for my needs. First i tried set up a Nextcloud with php 8.0.15. After the installation there was a php memory_limit warning. In the php settings was the option just to set it up higher which i was first very happy about. After i changed the setting to 512M but the warning was still there. A bummer. I've tried to get it away with the help of the nextcloud documentation but it wouldnt work.
Then i tried 7.4.27 and it worked fine.
But there is still a thing that i cant figure out which i find existential. I get with a freshly new installation nextcloud with plesk in a subfolder or a subdomain(which is then in a subfolder of the subdomain, like why?) the warning:
Your web server is not properly set up to resolve “/.well-known/caldav”.
Your web server is not properly set up to resolve “/.well-known/carddav”.
Just following the documentation and editing the lines in .htaccess doesnt fix the problem. I've tried it with adding
RewriteRule ^\.well-known/carddav /nextcloud/remote.php/dav [R=301,L]
RewriteRule ^\.well-known/caldav /nextcloud/remote.php/dav [R=301,L]
or
RewriteRule ^\.well-known/carddav /var/www/vhosts/domain/nextcloud/remote.php/dav [R=301,L]
RewriteRule ^\.well-known/caldav /var/www/vhosts/domain/nextcloud/remote.php/dav [R=301,L]
/var/www/vhosts/domain/nextcloud
but it still did not work. I could not find the solution here. Is there a solution?
Also using Nextcloudoffice and the code server just breaks the whole nextcloud. And everything just with the vanilla plesk nextcloud extension! To be honest i am quite disappointed about the integration.
 
Have you tried this solution in .haccess?
Code:
<IfModule mod_headers.c>
  Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains; strict-origin; preload"
  Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav
  Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav
</IfModule>
 
Have you looked into the web server log files what exactly is logged when you access your domain /.well-known/carddav for example? If the above does not work, either the mod_headers is not present in Apache or maybe PHP is not running through Apache but Nginx only. You need to check this in the web server log files. At least the request for the carddav directory must be logged and you can see what the web server thinks about it.
 
Back
Top