RVSitebuilder DB connection problem

If a client is logging into their cpanel, and trying to launch RVSiteBuilder, but they are getting the following error:

Cannot connect to DB, check your credentials, exiting …..
Sorry your request can not be processed now.Please contact your service provider. .

This is not a user problem, but a RVSiteBuilder problem. Check the database username and password in the config file located here:

/var/cpanel/rvglobalsoft/rvsitebuilder/var/SERVER.IP.ADDRESS.conf.php

Make sure that the username and password listed in that file match what MySQL has.

If you run the following commands, it will apply the username and password to the database.

grant all privileges on DATABASE_NAME.* to USERNAME@”localhost” identified by ‘PASSWORD’;
grant all privileges on DATABASE_NAME.* to USERNAME@”SERVER.IP.ADDRESS” identified by ‘PASSWORD’;
grant all privileges on DATABASE_NAME.* to USERNAME@”SERVER.HOSTNAME” identified by ‘PASSWORD’;

cpanel mutliple sites on one IP Address

This is a sticky unsupported subject. By default you can have site’s with dedicated IP addresses, sites on “A” shared IP address, or you can have a site that has addon domains within the same account that shares the shared or dedicated IP for that account. However, we recently worked with a client and their requirement was to group accounts by client and then assign each group a separate IP address. We encountered problems at first because we would assign one site an IP address. We would then use the Change Site’s IP Address tool or the Change Multiple Sites’ IP Addresses tool and the IP for the group of accounts wasn’t there. Here’s a quick fix:

Share IP addresses for a select set of accounts in cpanel:

Lets say you have domain1.com, domain2.com, and domain3.com on the same server and you want to keep them as individual accounts while allowing them to share an IP address.
1.) Login to the WHM and click Show IP Address Usage
2.) Find an available IP address that you would like to use and Copy it
3.) Click on Basic cPanel/WHM Setup – Main Shared Virtual Host IP – This should be your primary server IP (Write down this IP for future reference). Update this with the newly copied IP address that you’d like to use and click Save Changes
– Note this does not change any sites to this IP
4.) Click Change Multiple Sites’ IP Addresses
Locate and check the domains that should share this new IP i.e. domain1.com, domain2.com, domain3.com
5.) Click Change IPs of Selected Accounts
6.) Next to each site there should be a drop down box. Select the last option in each drop down box which should read:
0.0.0.0 (main shared IP) where 0.0.0.0 is the new IP for the sites to share
7.) Click Change IPs

You now have a group of accounts sharing the same IP in cpanel!

Important! – Once you are done Click on Basic cPanel/WHM Setup – Main Shared Virtual Host IP – replace this value with the original Main Shared Virtual Host IP and click Save Changes. If you don’t newly created accounts will receive the IP address that you just setup for a specific group.

Cpanel overwrites config files

Cpanel is a great control panel. However, one drawback is that configuration changes and/or customizations are often overwritten after every upgrade. In order to stop cpanel from overwriting your configuration files you must use the following file:
vi /etc/cpanelsync.exclude

The format for this file is one file per line. i.e.
/etc/exim.conf

Then save the file and restart cpanel. This will ensure cpanel doesn’t overwrite the /etc/exim.conf file the next time it processes an upgrade. Now the only trick is figuring out how to stop it from overwriting:
/etc/cpanelsync.exclude

Just Kidding. Give it a try and let us know how this fix works for you.

Cannot remove email account from cPanel

This can happen when switching the domain name on an account:

Sorry, you do not have access to the domain domain.com

Remove the following folders, if they exist:

/home/user/mail/olddomain.com/xxx
/home/etc/olddomain.com

Locate and backup the following files:

/home/user/.cpanel/
email_accounts.yaml
email_accounts.cache

Empty email_accounts.cache and edit email_accounts.yaml to remove the accounts/domain no longer required.

If it still does not work, you can try running ‘/scripts/whoowns olddomain.com’ for some additional information.

Rebuild default virtual host

The following steps will rebuild the default virtual host within cPanel servers.  You can edit the default host file via the following location:

cd /var/cpanel/templates/apache2

Update the file vhost.default to your liking.

Once the above is complete, run the following:

/usr/local/cpanel/bin/build_apache_conf

You will then need to update apache accordingly.