Exim issue – “connect ACL: ratelimit database not available”

Sometimes exim is messed up and when you are reviewing the exim_mainlog, you might see the following:

==========================
2012-05-11 07:42:16 [16332] Failed to get write lock for /var/spool/exim/db/ratelimit.lockfile: timed out
2012-05-11 07:42:16 [16332] H= temporarily rejected connection in “connect” ACL: ratelimit database not available
==========================

This issue causes because of cache databases corruption and of the presence of db lock files in the path “/var/spool/exim/db/”. Please go ahead and clear all files in that path.

do, rm -rf /var/spool/exim/db/*

then restart exim.

If that didn’t fix, you should empty the “.MYD” files present in the “eximstats” database.

Go to “/var/lib/mysql/eximstats”

# > defers.MYD, > sends.MYD etc

Then please restart exim.

Proxy subdomains not working

When proxy subdomains such as cpanel.domain.com, webmail.domain.com is not working, first make sure that Proxy subdomains is turned on in “Main >> Server Configuration >> Tweak Settings”. If the problem again persist, then go and add the virtual host entry manually in very bottom of httpd.conf file.

======================================================
# CPANEL/WHM/WEBMAIL/WEBDISK PROXY SUBDOMAINS

ServerName server.hostname.com
ServerAlias cpanel.* whm.* webmail.* webdisk.*
DocumentRoot /usr/local/apache/htdocs
ServerAdmin servers@domain.com

suPHP_UserGroup nobody nobody

RewriteEngine On

SSLProxyEngine On

RewriteCond %{HTTP_HOST} ^cpanel.
RewriteCond %{HTTPS} on
RewriteRule ^/(.*) https://127.0.0.1:2083/$1 [P]
RewriteCond %{HTTP_HOST} ^webmail.
RewriteCond %{HTTPS} on
RewriteRule ^/(.*) https://127.0.0.1:2096/$1 [P]
RewriteCond %{HTTP_HOST} ^whm.
RewriteCond %{HTTPS} on
RewriteRule ^/(.*) https://127.0.0.1:2087/$1 [P]
RewriteCond %{HTTP_HOST} ^webdisk.
RewriteCond %{HTTPS} on
RewriteRule ^/(.*) https://127.0.0.1:2078/$1 [P]
RewriteCond %{HTTP_HOST} ^cpanel.
RewriteRule ^/(.*) http://127.0.0.1:2082/$1 [P]
RewriteCond %{HTTP_HOST} ^webmail.
RewriteRule ^/(.*) http://127.0.0.1:2095/$1 [P]
RewriteCond %{HTTP_HOST} ^whm.
RewriteRule ^/(.*) http://127.0.0.1:2086/$1 [P]
RewriteCond %{HTTP_HOST} ^webdisk.
RewriteRule ^/(.*) http://127.0.0.1:2077/$1 [P]
UseCanonicalName Off

Include “/usr/local/apache/conf/includes/post_virtualhost_global.conf”
Include “/usr/local/apache/conf/includes/post_virtualhost_2.conf”
======================================================

E-mail accounts not showing in cPanel

The issue when you open “Email accounts” in cPanel, it sometimes doesn’t show up the list of Email accounts the domain have but only just a blank page. This happens due to bulk of cache, temp files etc present in the .cpanel directory of domain. You can remove the “.cpanel” directory inside the path /home/cpaneluser/. The issue will be solved.

And don’t worry about the “.cpanel” directory, it will automatically recreate next time when you load the account’s cPanel.

Joomla site error after changing account’s username

When renaming cpanel username of a Joomla site, please note that that only changes in cPanel related settings and the database name. The change never make any effect on the 3rd party softwares the site is using. That is the username wont be changed automatically in the Joomla configuration file. We need to change the username manually in the “configuration.php” file of Joomla.

The following error we get sometimes after changing account’s username and when the change not automatically made in Joomla configuration file.

========================
*Warning*: require_once()
[function.require-once]:
open_basedir restriction in effect.
File(/home/oldusername/public_html//includes/version.php) is not within the
allowed path(s): (/home/newusername:/usr/lib/php:/usr/local/lib/php:/tmp) in *
/home/newusername/public_html/includes/joomla.php* on line *71*
========================

In above it is clear that, because of old username entry in Joomla config file, when we try to load up the site, Joomla seeks for the olduser and found it doesn’t exist inside anywhere in the public_html directory of site. So it finally tries to jump outside of the home user directory and for to search the user outside of it. But the PHP open_basedir restriction wont allow it to go outside of the public_html directory and errors generates when we load the site on browser.

To rectify this, please manually change to new username in the Joomla configuration file too.

If you are still facing the database connecting issue when loading site, then got to check your site’s database. May be it still contains old username as starting name for tables in it. You need to rename them all.

For that, following the below steps:
#cd /var/lib/mysql
#mysqldump user_db > user_db.sql
#replace oldusername newusername — user_db.sql
#mysqladmin drop user_db
#mysqladmin create user_db
#mysql user_db < user_db.sql

Your site will be loading fine for sure 🙂