1
Pending Issues / Re: Cloudflare 524 Error with Roudcube
« Last post by MagdAlmuntaser on May 10, 2024, 10:59:55 PM »There is an issue between the Cloudflare DNS proxy....
This isn't a Roundcube issue.....
A similar comment was posted earlier in this thread.....
Ok guys..
Finally, I found where the problem lies. The issue is not with Roundcube, it's with the cPanel plugin, specifically CardDAV. You'll find it in this path:
/usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav
The exact problem is in the config.inc.php file. An "if" condition should be added to the code to check if /var/cpanel/calendarserver exists on the server or not because it will use port 2080, which is not supported by Cloudflare.
Solution:
Replace the following code in the config.inc.php file, and the webmail will work:
Code: [Select]
$prefs['_GLOBAL']['suppress_version_warning'] = false;
$prefs['_GLOBAL']['sync_collection_workaround'] = false;
if(file_exists('/var/cpanel/calendarserver')) {
$domain = getenv('HTTP_HOST');
if( empty($domain) ) $domain = getenv('DOMAIN');
// Figure out the expected formatting based on username
$userName = (string) $_SERVER['_RCUBE'];
$userFormat = (string) '%l@%d';
if( strpos($userName, '/') === false) {
$userFormat = '%l';
}
$prefs['cPCardDAV'] = array(
'name' => 'cPanel CardDAV',
'username' => $userFormat,
'password' => '%p',
'url' => 'https://' . $domain . ':2080/addressbooks/' . $userFormat . '/addressbook/',
'active' => true,
'fixed' => array( 'name', 'username', 'password' ),
'hide' => false,
);
}