Day: May 26, 2007

Introduction to cPanel (part-1)

Introduction to cPanel (part-1)

Introduction –

In this article we will cover cPanel directory structure and configuration files –
When you install cPanel on your web Server, cPanel configuration files, setting, script, admin templates and 3rd party modules are stored in following three directories –

/usr/local/cpanel
/var/cpanel
/scripts

1) /usr/local/cpanel – This is the main directory for cPanel, most of the setting is stored here.

cpanel1

a) /usr/local/cpanel/bin –This directory contains only scripts and binaries which provide installation and configuration of many cPanel managed services…

b) /usr/local/cpanel/logs –

This directory contains access log ,error log and license log of cPanel control panel.

* Access log format –

[source address] – [username] [[date]] [status] [url] [browser agent]

root@arunbagul:~#tail -f /usr/local/cpanel/logs/access_log
127.0.0.1 – root [31/May/2006:23:11:31 -0500] “” 500 0
“https://www/cpane.net:2087/scripts/command?PFILE=main” “Mozilla/5.0 (X11; U; Linux
i686; en-US; rv:1.8.0.3) Gecko/20060512 Firefox/1.5.0.3”
127.0.0.1 – root [31/May/2006:23:11:31 -0500] “” 500 0
“https://www.cpanel.net:2087/scripts/command” “Mozilla/5.0 (X11; U; Linux i686; en-US;
rv:1.8.0.3) Gecko/20060512 Firefox/1.5.0.3”
…….
……….

root@arunbagul:~#

* Error log –

root@arunbagul:~# tail -f /usr/local/cpanel/logs/error_log
Can’t locate Net/AIM/Connection.pm in @INC (@INC contains: /scripts /usr/lib/perl5/5.8.7/i686-
linux… /usr/lib/perl5/site_perl/5.8.7/i686-linux /usr/lib/perl5/site_perl/5.8.7 /
usr/lib/perl5/site_perl/5.8.5 /usr/lib…. /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /
usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site… /usr/lib/perl5/site_perl .) at /
usr/lib/perl5/site_perl/5.8.7/Net/AIM.pm line 37.
BEGIN failed–compilation aborted at /usr/lib/perl5/site_perl/5.8.7/Net/AIM.pm line 37.
Compilation failed in require at /scripts/cPScript/iContact.pm line 14.
BEGIN failed–compilation aborted at /scripts/cPScript/iContact.pm line 14.
Compilation failed in require at /scripts/wwwacct line 18.
BEGIN failed–compilation aborted at /scripts/wwwacct line 18.
….
…..
root@arunbagul:~#

* License log file –

root@arunbagul:~# tail -f /usr/local/cpanel/logs/license_log
License Update Request at: Wed May 13
02:16:13 2007
License Server returned: Key Accepted
License Server returned: Key Follows
License Updated Successfully
….
…..
root@arunbagul:~#

* Stat log –

root@arunbagul:~# tail -f /usr/local/cpanel/logs/stats_log
Update for config
“/home/techdump/tmp/awstats/awstats.cpanel.net.conf”
With data in log file “/usr/local/apache/domlogs/techdump.net”…
Phase 1 : First bypass old records, searching new record…
Direct access to last remembered record is out of file.
So searching it from beginning of log file…
Phase 2 : Now process new records (Flush history on disk after
20000 hosts)…
Jumped lines in file: 0
Parsed lines in file: 14
Found 0 dropped records,
Found 0 corrupted records,
Found 0 old records,
Found 10 new qualified records.
…….
………

root@arunbagul:~#

cpanel2

c) /usr/local/cpanel/base –

This is the base directory for cPanel admin panel web server(apache). It also contains directory
/usr/local/cpanel/base/frontend – this directory content control pannel themes like x ,x2 , xmail, monsoon etc…

cpanelbase

d) /usr/local/cpanel/base/etc –

This directory contains conf files for cPanel admin panel, template files for FTP, HTTP, mail, zone files..

cpanelconf

e) Extra 3rd party modules for cPanel –

3rd party module which are not part of cPanel base, can be installed in /usr/local/cpanel/3rdparty directory.. like ioncube etc

cpanel3rdparty

Thank you,
Arun Bagul