How to resolve : Internal server Error when accessing cPanel/WHM/Webmail
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:
- HTTP ERROR 500
- Internal Server Error
- Blank page after login
- Unable to access:
- Login page loads but dashboard fails
- Browser displays “500 Internal Server Error”
Common Causes
| Cause | Description |
|---|---|
| cPanel service stopped | cPanel daemon is not running |
| Apache failure | HTTP service unavailable |
| Corrupted SSL certificates | Invalid or expired service certificates |
| Disk full | No free storage available |
| Memory exhaustion | System out of RAM |
| Incorrect permissions | File ownership issues |
| Firewall blocking | Required ports blocked |
| Corrupted EasyApache | Apache configuration issues |
| License issue | Expired or invalid cPanel license |
| Service configuration corruption | cpsrvd 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.
| Service | Port |
|---|---|
| WHM | 2087 |
| cPanel | 2083 |
| Webmail | 2096 |
| HTTP | 80 |
| HTTPS | 443 |
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
| Check | Status |
|---|---|
| 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.
