Troubleshooting cPanel License Issues

July 29th, 2010 by tech No comments »

If you get an error message that your cPanel instance is not activated, and you believe this to be in error, here are some steps for troubleshooting:

1. Re-check in with the license servers:
/usr/local/cpanel/cpkeyclt

If you see the following, you’re in good shape:

# /usr/local/cpanel/cpkeyclt
Updating cPanel license...Done. Update succeeded.
Building global cache for cpanel...Done

2. If that doesn’t work, you’ll want to go to the cPanel License Verification System to ensure your license is still valid.

3. If the IP is licensed properly, check the server to see if cPanel is detecting the correct IP address for your install:
# curl cpanel.net/apps/myip/

Running that command should return your base IP address. If it doesn’t, then there is a networking issue, or the wrong IP address is licensed.

4. If all else fails, open a ticket with cPanel Customer Service.

  • Share/Bookmark

How to Increase the Serial Number For All DNS Zones

July 29th, 2010 by tech No comments »

NDCHost has made available a nice script that will increase the serial numbers for all DNS zones:

# cd /sbin
# rm -f updateserial
# wget http://www.ndchost.com/cpanel-whm/scripts/updateserial/download.php
# chown root.root updateserial
# chmod 0750 updateserial
# /sbin/updateserial -d /var/named

To activate your changes, be sure to reload rndc:
# rndc reload

  • Share/Bookmark

Increase Memory Available for Tomcat & Java

June 18th, 2010 by tech No comments »

First, open the following file in your favorite editor:

# vi /var/cpanel/tomcat.options

Insert the following 2 lines (if not already present):

Xmx200M
Xms100M

Xmx is the upper limit and Xms is the lower limit.

Once done, restart the Tomcat service:

#/scripts/restartsrv_tomcat

  • Share/Bookmark

Link to Software Package Page in Fantastico

June 14th, 2010 by tech No comments »

Linking to a specific software package in Fantastico is easy, and great for use with custom icons, or for linking customers to the installation/configuration page.

For example, a link to PHPBB2 looks like this:

https://yourhostname.tld:2083/frontend/x3/fantastico/autoinstallhome.php?app=phpBB2

This one’s a no-brainer really, as the links are the same in the Fantastico interface, but some might find this useful when creating custom icon groups in cPanel.

  • Share/Bookmark

Quotas will not be enabled on /home to prevent performance degradation.

May 21st, 2010 by tech No comments »

Error: Quotas will not be enabled on /home to prevent performance degradation.

You may see this when running /scripts/initquotas or /scripts/fixquotas. Either there’s something wrong with your /etc/fstab file that cPanel couldn’t correct, or you have your backups set to provision to a folder in /home, which is not recommended. This disabling of usrquota on /home is intentional if backups are set to go to /home.

# grep BACKUP /etc/cpbackup.conf

You can check the configuration in WHM >> Configure Backups, or via SSH with:

root@main [/home/ihost/public_html/skoal]# grep BACKUPDIR /etc/cpbackup.conf
BACKUPDIR /home/somefolder

If you see something similar to the above, quotas are not going to work for you. You’ll want to set backups to be delivered offsite via FTP, or to another partition, ideally a completely separate hard drive in case of hard drive failure.

  • Share/Bookmark

How To Reinstall Horde

May 21st, 2010 by tech No comments »

To reinstall Horde, preserving the existing database, you can use the following:

/usr/local/cpanel/bin/update-horde --force

  • Share/Bookmark

500: [warn] Directory / is not owned by username

May 21st, 2010 by tech No comments »

If your site is getting a 500 error, you’ll want to check Apache’s error_log at /usr/local/apache/logs/error_log.

If you see the following error, you’ll want to check the ownership of “/” to ensure it’s owned by root:root, and not a user on your server.

[Mon May 03 22:26:47 2010] [warn] Directory / is not owned by rrsdd

Let’s check the ownership:

# stat /
File: `/'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 1bh/27d Inode: 99717474 Links: 26
Access: (0755/drwxr-xr-x) Uid: ( 535/ cpus123) Gid: ( 0/ cpus123)

This shows that the / folder is owned by “cpus123″ which is incorrect, and you’ll want to change the ownership to root:root.

#chown root:root /

Now let’s verify:

# stat /
File: `/'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 17h/23d Inode: 917505 Links: 25
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)

  • Share/Bookmark

info [rebuildhttpdconf] User ‘username’ data set has no ‘main_domain’ key.

May 21st, 2010 by tech No comments »

Error: info [rebuildhttpdconf] User ‘username’ data set has no ‘main_domain’ key.

Solution: Check to see if there is a file called “main” for the user(s) affected users in /var/cpanel/userdata/username.

If it’s not present, verify the domain exists in httpd.conf, and run /usr/local/cpanel/bin/userdata_update to recreate the “main” file based off the apache configuration.

  • Share/Bookmark

Automatically Create DomainKeys Records When Creating Account

May 21st, 2010 by tech No comments »

Hopefully this will someday be an option in “Tweak Settings”, but in the meantime, you can add DomainKeys records to your customers DNS zones automatically by creating a “hook” which will be run after /scripts/wwwacct (the script behind “Create an Account” in WHM).

You’ll want to create a file called /scripts/postwwwacct, and add the following content:

my %OPTS = @ARGV;
my $user = $OPTS{’user’};
/usr/local/cpanel/bin/domain_keys_installer $user

You’re all set now — there’s nothing else that needs to be done. Note that this only creates the DomainKeys records for new accounts. If you want to create DomainKeys records for all your existing users at once, check out my other article on the topic: http://www.cpaneladmins.com/2009/12/07/install-domainkeys-and-spf-records-for-all-users/

  • Share/Bookmark

Apache error: RewriteCond> directive missing closing ‘>’

May 21st, 2010 by tech No comments »

Error:

httpd: Syntax error on line 13 of
/home/girit/public_html/.htaccess.igvjRiTOB3TiKlh0Pf8wcDk4yuRcH5ba:
RewriteCond> directive missing closing '>'

Solution: edit the .htaccess file in vi (or your favorite text editor) and ensure there is a blank line (new line) at the bottom of the file.

  • Share/Bookmark

cPanel Web Site Hosting by IntraHost