Warning about resolving cardav,caldav, etc

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 23.0.0
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04 LTS
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.41
PHP version (eg, 7.4): 7.4.3

The issue you are facing:
I receive two kind of warnings:

Your *web server* is *not* properly set up to resolve “/.well-known/caldav”..

and same for webinfo,cardav, etc.

And the second warning is

The “*X-Content-Type-Options* ” *HTTP* header is *not* configured to equal to “*nosniff* ”
Is this the first time you've seen this error? _(Y/N)_:

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'XXXXXXXXX',
  'passwordsalt' => 'XXXXXXXXXXXXX',
  'trusted_proxies' => 
  array (
    0 => '',
  'trusted_domains' => 
  array (
    0 => 'labahouse.ddns.net',
    1 => '10.0.0.*',
    2 => '*.labahouse.it',
  'datadirectory' => '/media/dati_nuc/cloud',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => '',
  'overwriteprotocol' => 'https',
  'overwritehost' => 'nuc.labahouse.it',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'XXXXXXXXX',
  'dbpassword' => 'XXXXXXXXXXXX',
  'installed' => true,
  'has_rebuilt_cache' => true,
  'maintenance' => false,
  'updater.secret' => 'XXXXXXXXXXXXXXXXX',
  'theme' => '',
  'loglevel' => 3,

My nextcloud installation is in /var/www/html/cloud.

I already added in /var/www/html/.htaccess the following lines, as suggested in other topic:

Header set X-Content-Type-Options "nosniff"
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteRule ^\.well-known/carddav /cloud/remote.php/dav [R=301,L]
  RewriteRule ^\.well-known/caldav /cloud/remote.php/dav [R=301,L]
  RewriteRule ^\.well-known/webfinger /cloud/index.php/.well-known/webfinger [R=301,L]
  RewriteRule ^\.well-known/nodeinfo /cloud/index.php/.well-known/nodeinfo [R=301,L]

My nextcloud server is reached by a caddy reverse proxy. This is the Caddyfile:

(https_header) {

  header {
    Strict-Transport-Security "max-age=31536000; includeSubdomains"
    X-XSS-Protection "1; mode=block"
    X-Content-Type-Options "nosniff"
    X-Frame-Options "SAMEORIGIN"
    Referrer-Policy "same-origin"

https://nuc.labahouse.it {
  import https_header
  rewrite /.well-known/carddav /remote.php/dav
  rewrite /.well-known/caldav /remote.php/dav
  reverse_proxy {$NEXTCLOUD_HOST:localhost}
    tls XXXXXXXXXXX.it {
      dns cloudflare yyyyyyyyy

I can’t understand what is wrong in my configuration…