Overview

An Internal Server Error (HTTP 500) while accessing cPanel, WHM, or Webmail usually indicates a problem with the web server, cPanel services, SSL configuration, permissions, or system resources.

This guide provides step-by-step troubleshooting for Linux servers running cPanel & WHM.

Symptoms

Users may experience one or more of the following:

Common Causes

CauseDescription
cPanel service stoppedcPanel daemon is not running
Apache failureHTTP service unavailable
Corrupted SSL certificatesInvalid or expired service certificates
Disk fullNo free storage available
Memory exhaustionSystem out of RAM
Incorrect permissionsFile ownership issues
Firewall blockingRequired ports blocked
Corrupted EasyApacheApache configuration issues
License issueExpired or invalid cPanel license
Service configuration corruptioncpsrvd configuration damaged

Step 1: Check Server Status

Verify server uptime.

uptime

Example

15:21:17 up 52 days, load average: 0.42, 0.30, 0.18

Step 2: Verify Disk Space

Check available storage.

df -h

Example

Filesystem      Size Used Avail Use%
/dev/sda2        80G  79G  500M 99%

If usage is above 95%, clean unnecessary files.

Common cleanup:

yum clean all
journalctl --vacuum-time=7d
rm -rf /tmp/*

Step 3: Check Memory Usage

free -h

Check running processes.

top

or

htop

If RAM is exhausted:

  • Restart heavy services
  • Increase swap
  • Upgrade server memory

Step 4: Verify cPanel Service

Check service status.

systemctl status cpanel

or

service cpanel status

Restart if required.

systemctl restart cpanel

Step 5: Verify Apache Service

systemctl status httpd

For AlmaLinux/RHEL:

systemctl restart httpd

Ubuntu (rare with cPanel):

systemctl restart apache2

Step 6: Restart cPanel Services

Restart all important services.

/scripts/restartsrv_cpsrvd

Restart Apache.

/ scripts/restartsrv_httpd

Restart FTP.

/ scripts/restartsrv_ftpd

Restart Mail.

/ scripts/restartsrv_exim

Restart MySQL.

/ scripts/restartsrv_mysql

Step 7: Check cPanel Logs

Important log files:

tail -100 /usr/local/cpanel/logs/error_log
tail -100 /usr/local/apache/logs/error_log
journalctl -xe

Look for:

  • Permission denied
  • SSL errors
  • Segmentation faults
  • Disk full
  • Service startup failures

Step 8: Check SSL Certificates

Verify installed service certificates.

WHM

Home
→ Service Configuration
→ Manage Service SSL Certificates

Or rebuild certificates.

/usr/local/cpanel/bin/checkallsslcerts

Step 9: Check License

Verify cPanel license.

/usr/local/cpanel/cpkeyclt

Check version.

/usr/local/cpanel/cpanel -V

Step 10: Verify Apache Configuration

Test Apache configuration.

apachectl configtest

Expected output

Syntax OK

If errors appear:

/usr/local/cpanel/scripts/rebuildhttpdconf

Restart Apache.

systemctl restart httpd

Step 11: Check Firewall

Verify required ports.

ServicePort
WHM2087
cPanel2083
Webmail2096
HTTP80
HTTPS443

Check firewall.

firewall-cmd --list-all

or

iptables -L

Step 12: Verify cPanel Processes

ps -ef | grep cpanel

Expected:

cpsrvd
cpdavd
tailwatchd

If missing:

/scripts/restartsrv_cpsrvd

Step 13: Repair cPanel Installation

Update and repair.

/scripts/upcp --force

This:

  • Updates cPanel
  • Repairs missing files
  • Fixes corrupted installations

Step 14: Check Permissions

Repair ownership.

/scripts/fixeverything

Or restore ownership.

/scripts/chownpublichtmls

Step 15: Verify Hostname Resolution

hostname
hostname -f

Check DNS.

nslookup $(hostname)

Step 16: Rebuild cPanel Cache

rm -rf /usr/local/cpanel/base/frontend/*

Restart cPanel.

systemctl restart cpanel

Step 17: Check SELinux

Verify status.

getenforce

If enforcing causes issues (for testing only):

setenforce 0

If resolved, configure SELinux policies appropriately before re-enabling enforcement.

Step 18: Verify Webmail

Restart mail services.

/scripts/restartsrv_dovecot
/scripts/restartsrv_exim

Access:

https://domain.com/webmail

or

https://hostname:2096

Troubleshooting Checklist

CheckStatus
Server running
Disk space available
RAM available
cPanel service running
Apache running
SSL certificates valid
Firewall ports open
License valid
Apache config OK
Logs reviewed
Permissions correct
DNS working

Conclusion

A 500 Internal Server Error in cPanel, WHM, or Webmail is commonly caused by stopped services, low disk space, Apache configuration issues, SSL problems, or corrupted cPanel components. By systematically checking system resources, reviewing logs, verifying services, and repairing configurations, most issues can be resolved quickly while minimizing downtime.

Leave a Reply