Problem adding addon domain in cpanel

Error:

Sorry, the domain is already pointed to an IP address that does not appear to use DNS servers associated with this server. Please transfer the domain to this servers nameservers or have your administrator add one of its nameservers to /etc/ips.remotedns and make the proper A entries on that remote nameserver.

Logon to WHM Select Tweak Settings under Server Setup Put checkboxes next to both: Allow Creation of Parked/Addon Domains that are not registered Allow Creation of Parked/Addon Domains that resolve to other servers (ie domain transfers) [This can be a major security problem. If you must have it enabled, be sure to not allow users to park common internet domains.]

Server Load High in cPanel/WHM Server

Check the settings and add/adjust as follows:

Find the configuration file:

root@serv [~]# /usr/local/apache/bin/httpd -V
Server version: Apache/2.2.27 (Unix)
Server built:   Jun 12 2014 01:44:45
Cpanel::Easy::Apache v3.24.19 rev9999
Server's Module Magic Number: 20051115:33
Server loaded:  APR 1.5.0, APR-Util 1.5.3
Compiled using: APR 1.5.0, APR-Util 1.5.3
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses disabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/usr/local/apache"
 -D SUEXEC_BIN="/usr/local/apache/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

The config file is usually at:
/usr/local/apache/conf/httpd.conf

Add/Edit the config:

Start Servers 32
Minimum Spare Servers 32
Maximum Spare Servers 256
Server Limit 2000
Max Clients 1500
Keep-Alive On

How to Install an SSL Certificate via WHM with Root Access

1. Login to your WHM
2. Assigned dedicated IP – You will then select the IP Functions icon from the Main Menu.

Then, select ‘Change Site’s IP Address’ icon. You will now see a list of the domains and users on your server. Find the domain you are wishing to install the SSL Certificate on and click the ‘Change’ button at the bottom of the page. You will now be given a drop down list of available IPs for you to assign to your site. Select the IP you want and click the ‘Change’ button and your site’s IP will be changed (Make sure not to set this to ‘main shared IP’).

whm-ssl-domain-ip-user-fields

3. Install the SSL Certificate – Go back to the Main Menu and select the ‘SSL/TLS’ icon.

Then select ‘Install an SSL Certificate on a Domain’ icon. You will then be taken to the ‘Install an SSL Certificate on a Domain’ management page. You will need to fill out all fields in order to install the SSL Certificate.

A. Enter the CSR into the first field.

whm-ssl-csr-field

The SSL Manager will then try to fetch the rest of the fields needed. It should fill in the next three fields as such.

If any of this information isn’t correct then your SSL Certificate isn’t issued properly and you need to contact your SSL issuer for them to assist you with having the SSL Certificate reconfigured.

B. You will now need to insert the RSA key (If one was automatically fetched for you, please replace it with the one we have given you).

whm-ssl-rsa-field

C. You will then need to enter your CA Bundle in the last field (If you do not enter a CA then the SSL Certificate will appear as self-signed and a warning will be shown when customers attempt to access your site securely).

whm-ssl-ca-bundle-field

Once you enter all three needed aspects of the SSL Certificate (CRT, RSA, and CA Bundle) then click the ‘Install’ button. The server will then install the SSL Certificate and notify of completion or if any errors that may have occurred. The new certificate should begin to work immediately and you may view your site using https:// to confirm this.

Newer Panels Versions

Manually enter information

To manually enter all of the information for your certificate:

Enter your domain in the Domain field.

When you enter the complete domain name, the Autofill by Domain option will appear next to the Domain field. If you wish to continue to enter information manually, do not click Autofill by Domain.
If the selected domain is not dedicated to a specific IP address, select an available IP address from the IP Address menu. You can only select an IP address that is labeled as shared oravailable.
In the Certificate field, copy and paste the entire contents of your certificate’s .crt file.
In the Private Key field, copy and paste the entire contents of your certificate’s .key file.
If you chose to install a purchased certificate, you may need to fill in the Certificate Authority Bundle (optional) field. If you do not have the information, contact the organization from which you purchased the certificate.
Click Install.
You can click Reset to remove the information from all fields.
If the installation is successful, WHM will display a message to indicate that the certificate installed. If the installation is unsuccessful, WHM will display an error message to indicate the problem. More information about how to troubleshoot an SSL installation is available.

Partitioning and Creating and Ext3 or Ext4 filesystem CentOS

We will install a new serial ATA hard drive into our system, and it’s hooked to the second SATA port, thus making our drive “sdb.” Enter the following as root:

# fdisk /dev/sdb

This brings up how many cylinders are on your hard disk, and of course opens up the fdisk program that will allow us to partition our new hard disk.

The next step is to simply enter a “p” to show the partition table. This is useful to see what partitions are already setup on the disk.

Command (m for help): p

Disk /dev/sdb: 50.0 GB, 50019202560 bytes
255 heads, 63 sectors/track, 6081 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System

Command (m for help):

There are no partitions on it. If any partitions are present we’ll just go ahead and delete them by pressing “d.”

Next we’ll need to partition our drive. We’ll keep it simple and mount this drive with a large, single primary partition, just like a backup drive. To do that enter “n” at the command line to create a new partition.

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-6081, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-6081, default 6081): 6081

Command (m for help):

As you can see, I hit “n” and it asked if I’d like to create a primary (P) or an extended partition (E) I hit P for a primary partition, entered “1″ for it being my first partition on the drive. Your first cylinder will be “1″ and the last one in our case will be “6081.” Most times you will be able to hit enter and use the default cylinder counts.

Verify that we’ve done everything correctly up until this point. At the command prompt enter “p” to check the partition table again:

Command (m for help): p

Disk /dev/sdb: 50.0 GB, 50019202560 bytes
255 heads, 63 sectors/track, 6081 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdb1             1      6081  48845601   83  Linux

Command (m for help):

Now you can see that we’ve added a partition to the drive, but we’re not done yet. No changes have been written to the disk yet, everything is just in memory. If everything looks right, go ahead and enter the “w” command which will write the changes to the disk.

Creating an ext3 file system

Now that our disk is partitioned to sdb1 we’ll need to format it. You can format your drive to any filesystem you want, but for our purposes here I’m going to format it with ext3, the most common today. To format your drive:

root@laxmi [~]# mkfs -t ext3 /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
Discarding device blocks: done                            
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
7331840 inodes, 29304560 blocks
1465228 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
895 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 20 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.


Using the mk2fs (make file system) command, we specified the type (using the -t) ext3 using the device and partition name (/dev/sdb1). You have successfully partitioned and formatted your new drive. We need to mount this partition to make it usable, and add an entry in the file “/etc/fstab”

We’re going to add this entry in the fstab file because on reboot, our drive that we just mounted will need to be remounted. By adding a simple entry in the fstab file our drive will be mounted every time on startup. To do this we’re going to add the following code on the last line of the file “/etc/fstab”

/dev/sdb1               /backup                  ext3    defaults        1 2

Once you’ve added that to the last line in the file, save it and issue this final command as root:

# mount /dev/sdb1

The mount command mounts the drive for immediate use, and the /dev/sdb1 is our drives partition name.

Creating an ext4 file system

The easiest way to create a file system on a partition is to use the mkfs.ext4 utility which takes as arguments the label and the partition device:

YOU MAY GET THIS IS YOU DO NOT SPECIFY THE NUMBER…

# mkfs.ext4 -L /backup /dev/sdd
mke2fs 1.41.12 (17-May-2010)
/dev/sdd is entire device, not just one partition!

# /sbin/mkfs.ext4 -L /backup /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=/backup
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
2097152 inodes, 8388352 blocks
419417 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
256 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 36 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

Mounting a File System

Now that we have created a new file system on the Linux partition of our new disk drive we need to mount it so that it is accessible. In order to do this we need to create a mount point. A mount point is simply a directory or folder into which the file system will be mounted. For the purposes of this example we will create a /backup directory to match our file system label (although it is not necessary that these values match):

# mkdir /backup

The file system may then be manually mounted using the mount command:

# mount /dev/sdb1 /backup

Configuring CentOS 6 to Automatically Mount a Ext4 File System

In order to set up the system so that the new file system is automatically mounted at boot time an entry needs to be added to the /etc/fstab file.

For ext 4 find the UUIS:

# blkid /dev/sdd1
/dev/sdb1: LABEL="/backup" UUID="6043e3e8-f0a3-405b-9905-9a6087fd02fe" TYPE="ext4"

Add to fstab

UUID=6043e3e8-f0a3-405b-9905-9a6087fd02fe /backup     ext4    1       1

The following example shows an fstab file configured to automount our /backup partition:

/dev/mapper/vg_centos6-lv_root /            ext4    defaults        1 1
UUID=0d06ebad-ea73-48ad-a50a-1b3b8ef24491 /boot  ext4    defaults        1 2
/dev/mapper/vg_centos6-lv_swap swap         swap    defaults        0 0
tmpfs                   /dev/shm            tmpfs   defaults        0 0
devpts                  /dev/pts            devpts  gid=5,mode=620  0 0
sysfs                   /sys                sysfs   defaults        0 0
proc                    /proc               proc    defaults        0 0
LABEL=/backup /backup      ext4    defaults        1 2

cPanel comes with a built in handy utility that will automatically detect, format, and partition your new drive with just a few clicks.

To install your new hard drive through cPanel you’ll need to login to WHM as root, and find the button on the left called “Format/Mount a new hard drive” under the drives tab about 3/4 the way down. Click on that. The next page will show you the newly detected drives and have a button next to the drive to select it. Once you select your new drive follow the onscreen instructions, and hit enter.

public_html directory not showing in ftp

A user could not show the public_html directory on a cpanel server. Run the following to see how many files are listed in the directory.

cd /home/username
ls|wc -l
10050

This folder has 10500 files. The settings for ftp do not allow a full directory listing. We removed the files that were not needed and ftp worked.

Also this is a setting in /etc/pure-ftpd.conf

nano /etc/pure-ftpd.conf
# 'ls' recursion limits. The first argument is the maximum number of
# files to be displayed. The second one is the max subdirectories depth

LimitRecursion 10000 8

To change this – change the line amount in the first number and restart ftp

LimitRecursion 11000 8
service pure-ftpd restart

To change the ftp maximum number of files on plesk.

nano /etc/proftpd.conf
ListOptions -a maxfiles 2000 maxdepth 3

Restart xinetd

 service xinetd restart

This configures the -a option by default, and limits the maximum files in the generated listing to 2000. If the client uses the -R option, proftpd will not recurse into directories more than 3 levels deep when generating the listing.

Cannot send or receive mail in WHM/cPanel Exim; frozen in queue

Error:

LOG: MAIN cwd=/usr/local/cpanel/whostmgr/docroot 4 args: /usr/sbin/exim -v -M 1WkPBs-0003X3-Nmdelivering 1WkPBs-0003X3-NmLOG: MAIN PANIC failed to expand condition “${if and{{bool_lax{NULL}}{bool_lax{${perl{should_archive_outgoing_message}}}}}}” for archive_outgoing_email router: Undefined subroutine &main::should_archive_outgoing_message called. inside “and{…}” conditionLOG: MAIN PANIC failed to expand condition “${if and{{bool_lax{NULL}}{bool_lax{${if eq {$authenticated_id}{}{0}{${if eq {$sender_address}{$local_part@$domain}{0}{${if match{$received_protocol}{N^e?smtps?a$N}{${perl{checkbx_autowhitelist}{$authenticated_id}}}{${if eq{$received_protocol}{local}{${perl{checkbx_autowhitelist}{$sender_ident}}}{0}}}}}}}}}}}}” for boxtrapper_autowhitelist router: Undefined subroutine &main::checkbx_autowhitelist called. inside “and{…}” conditionLOG: MAIN PANIC failed to expand condition “${if and{{bool_lax{NULL}}{bool_lax{${perl{check_mail_permissions}}}}}}” for check_mail_permissions router: Undefined subroutine &main::check_mail_permissions called. inside “and{…}” conditionLOG: MAIN PANIC failed to expand condition “${if and{{bool_lax{NULL}}{bool_lax{${perl{enforce_mail_permissions}}}}}}” for enforce_mail_permissions router: Undefined subroutine &main::enforce_mail_permissions called. inside “and{…}” conditionLOG: MAIN PANIC failed to expand condition “${if and{{bool_lax{NULL}}{bool_lax{${perl{increment_max_emails_per_hour_if_needed}}}}}}” for increment_max_emails_per_hour_if_needed router: Undefined subroutine &main::increment_max_emails_per_hour_if_needed called. inside “and{…}” conditionLOG: MAIN == web@cariplex.com R=dkim_lookuphost defer (-1): dkim_lookuphost router failed to expand “${perl{mailtrapheaders}}”: Undefined subroutine &main::mailtrapheaders called.n

Resolution:

You can rebuild the exim configure with


/scripts/buildeximconf

You should also open a ticket using the link in my signature so our techs can determine how your exim.pl.local file became corrupted in order to prevent it from happening again.

Also,
Backup your exim.conf and run the following.


/scripts/eximup --force