How to check Cpanel Logs

How to check Cpanel Logs

How to check Cpanel Logs

Reference KB: https://docs.cpanel.net/knowledge-base/cpanel-product/the-cpanel-log-files/

Website Raw Access Log

Option1: To check website access log from Cpanel front-end, login to the Cpanel of the particular domain & find the "Raw Access"  tab under "Metrics" Section 

The Raw Access log will of the domain will be available download as zip file, Click on the Zip files to download & extract to check the log

Option 2: To check website access log from the server SSH terminal, login to the server with SSH & go to the below provide domain log location 

[root@host ~]# cd /etc/apache2/logs/domlogs/

check the log of the website

[root@host domlogs]# tail akhandjyoti.com
51.158.76.214 - - [17/Feb/2023:06:02:25 +0530] "HEAD / HTTP/1.1" 301 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36"
207.46.13.209 - - [17/Feb/2023:06:33:14 +0530] "GET /contact-us HTTP/1.1" 301 246 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/103.0.5060.134 Safari/537.36"
159.65.144.82 - - [17/Feb/2023:06:35:00 +0530] "GET /.env HTTP/1.1" 301 240 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36"
159.65.144.82 - - [17/Feb/2023:06:35:00 +0530] "POST / HTTP/1.1" 301 236 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36"

 

Website Error Log

Option 1: To check website error log from Cpanel front-end, login to the Cpanel of the particular domain & find the "Error" tab under "Metrics" Section 

Check the error logs 

Option 2: To check the website error log from server SSH terminal, login to the server with SSH & go to the below provide domain error log location

[root@host ~]# cd /usr/local/apache/logs/

Check the error logs

[root@host logs]# tail error_log 
[Fri Feb 17 12:54:42.990371 2023] [proxy_fcgi:error] [pid 31130] [client 172.71.102.33:0] AH01071: Got error 'Primary script unknown'
[Fri Feb 17 12:54:43.458245 2023] [proxy_fcgi:error] [pid 31130] [client 172.71.102.33:0] AH01071: Got error 'Primary script unknown'
[Fri Feb 17 12:54:43.925414 2023] [proxy_fcgi:error] [pid 31130] [client 172.71.102.33:0] AH01071: Got error 'Primary script unknown'
[Fri Feb 17 12:54:44.367908 2023] [proxy_fcgi:error] [pid 31130] [client 172.71.102.33:0] AH01071: Got error 'Primary script unknown'

FTP Access Log

Option 1: To check the FTP Access logs, login to the WHM Panel & Search for "FTP Raw Log Download"  & after that click on the domain name and download the log

Option 2:  To check the FTP logs from server SSH terminal, login to the server with SSH & go to the below provide FTP log location

[root@host ]# cd /etc/apache2/logs/domlogs

Check the FTP logs on the "ftpxferlog" file

[root@host ]# tail ftpxferlog 

FTP Login Logs

To check the FTP login logs, connect to the server via SSH & go to the below  log location

[root@host ~]# cd /var/log

Check the FTP Login logs on the "messages" file

[root@host log]# tail messages
Feb 17 13:35:01 host systemd: Started Session 190590 of user akhandcom.
Feb 17 13:35:01 host imunify-notifier[5621]: starting, version 2.1.4-2
Feb 17 13:35:01 host imunify-notifier[5621]: waiting for a connection/timeout
Feb 17 13:35:01 host imunify-notifier[5621]: new connection accepted

Cpanel Access Logs

Cpanel Access logs by Cpanel users can be checked through SSH terminal, go to the below Cpanel Access log location

[root@host ~]# cd /usr/local/cpanel/logs/

And the check the log on the file "access_log"

[root@host logs]# tail access_log
115.96.159.104 - akhandcom [02/17/2023:07:15:40 -0000] "POST /cpsess0975707275/json-api/cpanel HTTP/1.1" 200 0 "https://akhandjyoti.com:2083/cpsess0975707275/frontend/jupiter/filemanager/index.html" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36" "s" "-" 2083
115.96.159.104 - akhandcom [02/17/2023:07:10:23 -0000] "POST /cpsess0975707275/3rdparty/phpMyAdmin/index.php HTTP/1.1" 200 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36" "s" "-" 2083

Cpanel Maillog

Option 1: To check the Maillog from the Cpanel front-end, login to the Cpanel of the domain & & find the "Track Delivery"  tab under "Email" Section

 

Option 2: To check the maillog from SSH terminal, go to the below location:

[root@host ~]# cd /var/log

Check the log on the file "maillog"

[root@host log]# tail maillog
Feb 17 14:39:11 host dovecot: lmtp(22669): Disconnect from local: Logged out (state=READY)
Feb 17 14:40:13 host dovecot: lmtp(27675): Connect from local
Feb 17 14:40:14 host dovecot: lmtp(akhandcom@host.akhandjyoti.com)<27675><5Rm0HXVE72MbbAAAy1a2fQ>: msgid=<E1pSwkv-0007CH-1N@host.akhandjyoti.com>: saved mail to INBOX
Feb 17 14:40:14 host dovecot: lmtp(27675): Disconnect from local: Logged out (state=READY)



    • Related Articles

    • cPanel Backup Job monitoring

      Cpanel Backup Job monitoring Reference KB on Cpanel Backup log location: https://support.cpanel.net/hc/en-us/articles/4402165344535-Where-are-the-cPanel-Backup-logs Reference KB on Cpanel backup on locally mounted remote filesystem: ...
    • Plesk services logs and configuration files

      Plesk services logs and configuration files Plesk Logs Error log: /var/log/sw-cp-server/error_log Access log: /var/log/plesk/httpsd_access_log Panel log: /var/log/plesk/panel.log Configuration PHP config on RHEL-based: ...
    • Plesk Website Logs Access and Downoad

      View Website Logs from Plesk - Download and Step 1: Accessing log reports and download from plesk panel 1. Visit the URL http://<your_domain>:8880 or https://<your_domain>:8443 (For SSL) and login. 2. Go to the Websites & Domains and click on Logs ...
    • How to check Database Process List in Plesk Linux

      How to check the Database Process List in Plesk Linux We will follow the below steps to check the database process list from the Plesk Panel Step 1: Log in to the Plesk Panel > Tools & Settings > Database Process List Step 2: We can find the list of ...
    • How to Block IP's which consume additional bandwidth in cPanel

      How to Block IP's which consume additional bandwidth in cPanel How to Check Website Statistics Bandwidth usage in cPanel How to Block IP in cPanel How to Check Website Statistics Bandwidth usage in cPanel Step 1: Log in to cPanel. Step 2: In the ...