CalDAV and CardDAV redirects for Nginx proxy don't work anymore since 29.0.0

Nextcloud version : 29.0.0
Operating system and version: Docker image
Apache or nginx version: Couldn’t find it
PHP version: 8.2.19

I am using the Nginx Proxy Manager and had configured it properly for CalDAV and CardDAV synchronization. After upgrading I am told that my webserver isn’t properly set up anymore.

For the Nginx proxy I have used the following redirects

    location = /.well-known/carddav {
      return 301 $scheme://$host:$server_port/remote.php/dav;
    }
    location = /.well-known/caldav {
      return 301 $scheme://$host:$server_port/remote.php/dav;
    }

which I had found here once.

Is this the first time you’ve seen this error? (Y/N): Yes

The output of your Nextcloud log in Admin > Logging:

  • File is too big

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

<?php                                                                                                                                                                                                                                   
$CONFIG = array (                                                                                                                                                                                                                       
  'htaccess.RewriteBase' => '/',                                                                                                                                                                                                        
  'memcache.local' => '\\OC\\Memcache\\APCu',                                                                                                                                                                                           
  'apps_paths' =>                                                                                                                                                                                                                       
  array (                                                                                                                                                                                                                               
    0 =>                                                                                                                                                                                                                                
    array (                                                                                                                                                                                                                             
      'path' => '/var/www/html/apps',                                                                                                                                                                                                   
      'url' => '/apps',                                                                                                                                                                                                                 
      'writable' => false,                                                                                                                                                                                                              
    ),                                                                                                                                                                                                                                  
    1 =>                                                                                                                                                                                                                                
    array (                                                                                                                                                                                                                             
      'path' => '/var/www/html/custom_apps',                                                                                                                                                                                            
      'url' => '/custom_apps',                                                                                                                                                                                                          
      'writable' => true,                                                                                                                                                                                                               
    ),
  ),
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'redis',
    'password' => '',
    'port' => 6379,
  ),
  'instanceid' => 'xxxxxxxxxxxxx',
  'passwordsalt' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxx',
  'trusted_domains' => 
  array (
    0 => 'mydomain.de',
    1 => 'myhost',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '29.0.0.19',
  'overwrite.cli.url' => 'https://cloud.j29.duckdns.org',
  'overwriteprotocl' => 'https',
  'dbname' => 'nextcloud',
  'dbhost' => 'db',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'Moinsen88!!',
  'installed' => true,
  'default_phone_region' => 'DE',
  'overwriteprotocol' => 'https',
  'mail_from_address' => 'myemail',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'web.de',
  'mail_smtpsecure' => 'tls',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.web.de',
  'mail_smtpport' => '587',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpname' => 'myemail',
  'mail_smtppassword' => 'password!',
  'loglevel' => 2,
  'maintenance' => false,
  'maintenance_window_start' => 1,
  'memories.db.triggers.fcu' => true,
  'memories.exiftool' => '/var/www/html/custom_apps/memories/bin-ext/exiftool-amd64-glibc',
  'memories.vod.path' => '/var/www/html/custom_apps/memories/bin-ext/go-vod-amd64',
  'memories.gis_type' => 1,
);

The output of your Apache/nginx/system log in /var/log/____:

  • Apache log sin /var/log/apache2 are empty
  • Couldn’t find the Nginx log

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

  • File is too big and contains too much private information it seems

Hello, i have same issue with a global Nginx reverse proxy server

I don’t see any request to .well-known/carddav in the logs

Try this instead:

    location = /.well-known/carddav {
      return 301 $scheme://$host:$server_port/remote.php/dav/;
    }
    location = /.well-known/caldav {
      return 301 $scheme://$host:$server_port/remote.php/dav/;
    }

(note the trailing slashes)

1 Like

Works, thank you! I wonder why the old version worked before and doesn’t now.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.