Author Topic: CWP with remote DB and ProxySQL (Paid support?)  (Read 4485 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
CWP with remote DB and ProxySQL (Paid support?)
« on: March 01, 2021, 06:14:13 PM »
Hi to all, this is my first post here, i'm playing for a whyle with CWP (have some servers in prodution for more then 2 years now) and since i like CWP and is working pretty fine i decied to try and create a High Availability solution with CWP.

So in my setup i have 2 dedicated servers with VMWare ESXI 6.5 on both of them.

Short version, each dedicated server has:

1 x CWP Server
1 x ProxySQL
3 x Galera Cluster nodes with MariaDB

So far i managed to get working CWP directly connected to one of the Galera cluster nodes however connecting it to the ProxySQL does not work as expected.

Also i'm having problems setting up the mail part with remote DB.

Tried to reach the CWP guys using the e-mail provided on the website, asked if they could help if i buy a support package, no answer in more then 2 weeks so my questions are:

Did any of you guys managed to achive this? (At least i know is there is a real chance to get this working or not)

Do you guys think paying CWP support will help me achieve this? (Since they don't even respond to the e-mails.. and no, i did not asked them for free help, only asked if they are willing to help on this matter if i get a support plan)

All your answer & suggestions will be appreciated.


Offline
*****
Re: CWP with remote DB and ProxySQL (Paid support?)
« Reply #1 on: March 03, 2021, 08:28:26 AM »
Hi, if you want to use a remote SQL server you have to change the connection settings in CWP and MailServers.
Check the files:
Code: [Select]
/usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
/usr/local/cwpsrv/htdocs/resources/admin/include/postfix.php
/etc/postfix/mysql_{ALL}
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: CWP with remote DB and ProxySQL (Paid support?)
« Reply #2 on: March 03, 2021, 10:42:39 AM »
Thank you Igor, i was missing the /etc/postfix/mysql_{ALL} part.

Regarding to the roundcube conf /usr/local/cwpsrv/var/services/roundcube/config/config.inc.php should i also change the main db settings here or use the default ones set to localhost?

// Database connection string (DSN) for read+write operations
// Format (compatible with PEAR MDB2): db_provider://user:password@host/database
// Currently supported db_providers: mysql, pgsql, sqlite, mssql, sqlsrv, oracle
// For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php
// NOTE: for SQLite use absolute path (Linux): 'sqlite:////full/path/to/sqlite.db?mode=0646'
//       or (Windows): 'sqlite:///C:/full/path/to/sqlite.db'
$config['db_dsnw'] = 'mysqli://roundcube:pass@host/roundcube';

and

// The mail host chosen to perform the log-in.
// Leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
// Supported replacement variables:
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %s - domain name after the '@' from e-mail address provided at login screen
// For example %n = mail.domain.tld, %t = domain.tld
$config['default_host'] = 'remote-sql-host';


Offline
*****
Re: CWP with remote DB and ProxySQL (Paid support?)
« Reply #3 on: March 04, 2021, 10:59:25 PM »
Course. If you use Roundcube the connection settings must be changed too
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: CWP with remote DB and ProxySQL (Paid support?)
« Reply #4 on: March 05, 2021, 03:40:06 PM »
Very nice, mail works now as it should  ;D Thank you Igor!

So for any one facing the same issue here is what i did to have the mail running with remote database.

Edited:

/usr/local/cwpsrv/var/services/roundcube/config/config.inc.php

Changed $config['db_dsnw'] = from localhost to the remote DB.

In /etc/postfix/ changed from localhost to remote DB ip the following files.

mysql-relay_domains_maps.cf
mysql-virtual_alias_default_maps.cf
mysql-virtual_alias_maps.cf
mysql-virtual_alias_pipe_maps.cf
mysql-virtual_domains_maps.cf
mysql-virtual_mailbox_limit_maps.cf
mysql-virtual_mailbox_maps.cf

Now related to ProxySQL is there any one here using it with CWP ? Since i have multiple databases i need a way to use them all in HA and ProxySQL does exactly that however CWP does not seem to like ProxySQL and i'm not sure why..


Offline
*****
Re: CWP with remote DB and ProxySQL (Paid support?)
« Reply #5 on: March 10, 2021, 07:45:39 AM »
There are many ways to use Remote SQL servers and you must check which one is your with the system administrator who will maintance your servers.
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services