How to Fix 502 Bad Gateway Error in cPanel
Posted about 4 months ago 4.5kWhat 502 Bad Gateway Means
Proxy error: Server acting as gateway received invalid response from upstream.
Common Causes
- PHP-FPM down or misconfigured
- Cloudflare origin issues
- Server overload
- Firewall block
Troubleshooting Steps
Check Service Status
cPanel → Metrics → Service Status → Look for PHP-FPM or Apache issues.
Restart PHP-FPM
Contact host or use WHM if available.
Pause Cloudflare
Test if issue is origin or CDN related.
Solutions Table
| Cause | Solution |
|---|---|
| PHP-FPM down | Host restart service |
| Resource limit | Optimize site |
| Firewall | Check CSF/ConfigServer |
| Bad proxy config | Check Cloudflare SSL mode |