cPanel

From TBP Wiki
Jump to: navigation, search
CPanel Logo.png

cPanel is a Linux-based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site. cPanel utilizes a 3 tier structure that provides capabilities for administrators, resellers, and end-user website owners to control the various aspects of website and server administration through a standard web browser.

In addition to the GUI, cPanel also has command line and API-based access that allows third party software vendors, web hosting organizations, and developers to automate standard system administration processes.

cPanel is designed to function either as a dedicated server or virtual private server. The latest cPanel version supports installation on CentOS, Red Hat Enterprise Linux (RHEL), and CloudLinux. cPanel 11.30 is the last major version to support FreeBSD.

Application-based support includes Apache, PHP, MySQL, PostgreSQL, Perl, and BIND (DNS). Email based support includes POP3, IMAP, SMTP services. cPanel is accessed via https on port 2083.

Once installed, cPanel cannot be easily removed. cPanel's FAQ states that the best way to uninstall cPanel is by reformatting the server. However, uninstall guides are available online for expert server administrators who do not wish to reformat their server. Similarly, it should only be installed on a freshly installed operating system with minimal prior configuration.

Tools

cPanel comes with a lot of good scripts and tools to repair whatever it is. Here are a few of those along with some quick fixes:

Fix cPanel license problems

   /usr/local/cpanel/cpkeyclt

Clear autossl queue

   mv /var/cpanel/autossl_queue_cpanel.sqlite /var/cpanel/autossl_queue_cpanel.sqlite.BAK

Check all SSLs

   /usr/local/cpanel/bin/checkallsslcerts

Rebuild PHP-FPM /scripts/php_fpm_config --rebuild && /scripts/restartsrv_cpanel_php_fpm

Email tester

   check_mailips

cPanel access logs

   sudo cat /usr/local/cpanel/logs/access_log|awk '{print $1}'|sort|uniq -c|sort -n

Check cPanel licenses

   curl -s  http://verify.cpanel.net/index.cgi?ip=$(sudo cat /var/cpanel/mainip) | grep status1 > /dev/null && echo "Licensed" || echo "Not Liecensed"

AutoSSL from terminal

   /usr/local/cpanel/bin/autossl_check --user USERNAME

Command line location of each PHP cPanel version. Replace XX with version needed:

   /opt/cpanel/ea-phpXX/root/usr/bin/php