HTTP Error Fixes in Plesk and cPanel
Plesk and cPanel put a friendly interface over the same Apache, nginx and PHP software that any Linux server runs, but they also move the logs, manage the configuration files for you and add their own security layers. That changes where you look and what you are allowed to edit.
This guide is for site owners and developers on panel-managed hosting who have errors from an audit and need to know where the real message is, which panel settings usually cause 403, 500, 502 and 504 responses, and how to fix them without fighting the panel.
How a panel server is put together
Both panels generate web server configuration from their own database. That has two consequences worth knowing before you change anything.
- Hand edits to generated files are overwritten. If you edit an Apache or nginx file that the panel wrote, the panel can replace it the next time it rebuilds the configuration, for example when you change a hosting setting or the panel updates. Use the panel's own fields for extra directives instead; each panel provides them.
- Several programs may handle one request. On a typical Plesk Linux server, nginx sits in front and passes requests on to Apache, which runs PHP through PHP-FPM or FastCGI. Each layer can return its own error and each writes its own log. cPanel servers usually run Apache, often with PHP-FPM, and some hosts add nginx or a caching proxy in front.
Menus and labels vary between panel versions, hosting companies and the permissions your account has, so the paths below describe where these features are usually found rather than exact clicks. If you cannot see an option, your host may have hidden it or you may need a higher access level, and their support team can confirm.
Where the logs are
Plesk
In Plesk, open the domain from the Websites & Domains area and look for its Logs page. It combines
the domain's logs in one browser with filters for errors and time. On disk, the same files are usually
reachable through the subscription's logs folder, which is typically at /var/www/vhosts/example.co.uk/logs/
and stored under /var/www/vhosts/system/example.co.uk/logs/.
| File | Written by | Use it for |
|---|---|---|
error_log | Apache | Permission errors, .htaccess problems,
and PHP errors when PHP runs through Apache |
proxy_error_log | nginx in front of Apache | 502 and 504 errors, timeouts reaching Apache or PHP-FPM, nginx deny rules |
access_ssl_log, proxy_access_ssl_log | Apache and nginx | Status codes for each HTTPS request, with user agent and time |
php-fpm service log | PHP-FPM | Pool warnings such as reaching the maximum
number of children; often under /var/log/ with the PHP version in the folder name |
A 504 that appears in proxy_error_log but not in error_log tells you nginx
gave up waiting for Apache or PHP. A 500 with a line in error_log is an Apache or PHP problem.
cPanel
In cPanel, the Metrics section usually contains an Errors page that shows the most recent entries
from the Apache error log for your account, and a Raw Access page for downloading access logs. PHP errors
are often written to a file named error_log in the same folder as the script that failed,
so check the site's public folder and any plugin folders over FTP or the File Manager. Server administrators
with WHM or root access will find the main Apache logs, on many current cPanel servers, under /etc/apache2/logs/,
with per-domain access logs in a domlogs folder there.
# Plesk, over SSH: follow both the Apache and nginx error logs while you reload the page
tail -f /var/www/vhosts/system/example.co.uk/logs/error_log \
/var/www/vhosts/system/example.co.uk/logs/proxy_error_log
# cPanel account over SSH: find PHP error_log files written in the last day
find ~/public_html -name error_log -mtime -1 -ls
PHP version and handler
Most sudden 500 errors on panel hosting follow a change to PHP: the host retires an old version, someone switches the version to fix another site, or a plugin update needs a newer one than the domain uses.
- Plesk. Each domain has a PHP settings page, usually reached from the domain in Websites
& Domains. It shows the PHP version and the handler, such as an FPM application served by nginx or
by Apache, and lets you set values like
memory_limitandmax_execution_timeand add further directives. - cPanel. The Software section usually has a MultiPHP Manager for choosing each domain's
PHP version, and a MultiPHP INI Editor for settings such as
memory_limit. On some hosts a separate PHP selector provided by CloudLinux replaces these.
The handler matters as well as the version. On a handler that does not run PHP inside Apache, php_value
and php_flag lines in .htaccess are not understood and cause a 500. Move those
settings into the panel's PHP settings page, or into a .user.ini file in the site's root
folder where the host supports it.
.htaccess files stop having any effect. Redirects, deny rules and rewrite rules
in them silently stop working, which can turn working pages into 404s or expose folders you meant to
protect. Check this setting before and after changing handlers.Where to put extra web server directives
Plesk usually has an Apache & nginx Settings page per domain with boxes for additional Apache
and nginx directives. cPanel servers accept per-account changes through .htaccess and, for
administrators, include files that survive rebuilds. Use these rather than editing generated files. For
example, if nginx in front of Apache gives up too early on a domain with a known slow admin task, a longer
wait can be set in the additional nginx directives box:
# Plesk: additional nginx directives for this domain only
proxy_read_timeout 180s;
That line applies to every page on the domain, and a location block limited to one path
has to repeat the proxy settings the panel generates, which differ between servers. Copy those from the
domain's generated nginx file if you need a path-only rule, and treat any longer timeout as a stopgap.
The 504 guide explains how to find and
fix the slow step first.
Restarting and sizing PHP-FPM
When a PHP-FPM pool stops or runs out of workers, nginx or Apache cannot get an answer and returns 502 or 504. In both panels, PHP-FPM usually runs as a separate service per PHP version, and each domain gets its own pool.
- Plesk. Administrators can usually restart PHP services from the Services Management
page under Tools & Settings. Over SSH, the services are typically named after the version, for example
plesk-php83-fpmfor the PHP 8.3 build that Plesk supplies. Saving a domain's PHP settings also reloads its pool. - cPanel. Server administrators can restart PHP-FPM from WHM's service restart pages. Account users without WHM usually need to ask the host, although changing and saving the PHP version in MultiPHP Manager can also rebuild the pool.
# Plesk over SSH: check and restart the PHP 8.3 FPM service
systemctl status plesk-php83-fpm
systemctl restart plesk-php83-fpm
If the service log shows the pool reaching its maximum number of children, requests are queuing because every worker is busy. Plesk's PHP settings page often lets you change the FPM process manager values for the domain. Raise the maximum only if the server has spare memory, and look at what is keeping workers busy; the 502 guide covers sizing in more depth.
Ownership and permissions on panel servers
Panels expect files to be owned by the account's own system user. Files uploaded as root over SSH, restored from another server or extracted by a script running as a different user often break that rule, and the result is a 403, a 500 or pages that load without their images.
- Plesk. Site files normally belong to the subscription's system user with the
psaclngroup, while thehttpdocsfolder itself usually belongs to a separate web server group. Plesk includes a repair utility that can check and reset file system permissions for a domain, for exampleplesk repair fs example.co.ukover SSH, and many servers also offer a Diagnose & Repair page in the panel. Run it in check mode first if you are unsure what it will change. - cPanel. Files should belong to the cPanel account user. The File Manager has a Permissions
option for individual files and folders. On servers that run PHP as the account user, PHP may refuse
to run a script that is writable by group or others and return a 500, so avoid
775and777on PHP files;644for files and755for folders is the usual choice.
# Plesk: show who owns the web root and a sample file
ls -ld /var/www/vhosts/example.co.uk/httpdocs
ls -l /var/www/vhosts/example.co.uk/httpdocs/index.php
# cPanel account: list PHP files writable by group or others
find ~/public_html -name "*.php" -perm /022 -ls
For a full walk-through of 403 causes beyond the panel, see the 403 Forbidden guide.
Firewalls, ModSecurity and resource limits
Panels ship with security tools that can refuse legitimate requests, including requests from an audit or a search engine crawler.
- ModSecurity. Plesk offers a Web Application Firewall page in Tools & Settings for the server-wide rule set, and a per-domain page where specific rule IDs can usually be switched off. cPanel has a ModSecurity page where it can be turned on or off per domain, and WHM offers more detailed control. Find the rule ID in the error log before changing anything, and disable only that rule.
- IP banning. Plesk can run Fail2Ban, listed as IP address banning, and cPanel servers often run a firewall such as CSF or Imunify360. These can ban an IP address after a burst of errors or requests. If your audit, office or monitoring service suddenly receives nothing at all, check the ban list.
- Resource limits on shared plans. Many cPanel hosts use CloudLinux, which limits each account's CPU, memory and simultaneous processes. When a limit is hit, visitors may see a 508 Resource Limit Is Reached page or slow responses. The Resource Usage page in cPanel, where available, shows when limits were reached.
The fix, step by step
Step 1
Open the right log for the domain
Take
a failing URL and its time from the HTTP Error Audit. In Plesk, open the domain's Logs page, or read
error_log and proxy_error_log in the domain's logs folder, since nginx records
502 and 504 errors separately. In cPanel, check the Errors page under Metrics and any error_log
file in the folder of the failing script. Match the time and path before assuming a cause.
Step 2
Check the PHP version and handler
Open
the domain's PHP settings in Plesk, or MultiPHP Manager in cPanel, and note the version and handler.
If errors began when the version changed, the log will usually show a fatal error from old code. Move
any php_value lines out of .htaccess into the panel's PHP settings, and in
Plesk confirm that Apache is still in the chain if the site depends on .htaccess rules.
Step 3
Restart or tune PHP-FPM for the site
For 502 or 504 errors, check that the site's PHP-FPM service is running. In Plesk, use Services
Management or restart the versioned service such as plesk-php83-fpm over SSH; on cPanel,
use WHM or ask your host. If the FPM log shows the pool hitting its maximum children, find what keeps
workers busy before raising the limit, and only raise it if memory allows.
Step 4
Repair file ownership and permissions
Check
that site files belong to the account's own user rather than root. On Plesk, run the file system repair
for the domain, such as plesk repair fs example.co.uk, in check mode first, or use Diagnose
and Repair in the panel. On cPanel, set files to 644 and folders to 755, and
remove group or world write access from PHP files, which some servers refuse to run.
Step 5
Review firewall and ModSecurity blocks
Search the error log for ModSecurity entries at the failure time and note the rule ID. In Plesk, switch off that single rule for the domain on its Web Application Firewall page; in cPanel, use the ModSecurity page or ask your host to exclude the rule. Check Fail2Ban, CSF or Imunify360 for banned addresses, and unban your audit or monitoring IP if it was caught by mistake.
Step 6
Check resource limits on shared plans
If the site returns 508 errors or slows down during busy periods, open the Resource Usage page in cPanel, where your host provides it, and look for CPU, memory or entry process limits being reached at the times of the errors. Reduce the load with page caching and by moving heavy scheduled tasks to quiet hours, or ask the host about a plan with higher limits.
Step 7
Retest the site and each failing URL
Request each fixed URL with curl -sI and confirm a 200, then load
a few pages in a private browser window to check that redirects and images still work after any handler
or permission change. Re-run the HTTP Error Audit across the whole site, because a panel setting applies
to every page on the domain, not only the one you tested.
Habits that prevent panel-caused errors
- Change PHP versions deliberately. Test a new version on a staging subdomain or a copy of the site before switching the live domain, and keep a note of which version each site needs.
- Upload as the account user. Use SFTP with the account's own login rather than root, so ownership stays correct.
- Keep custom directives in panel fields. Anything added directly to generated configuration files can disappear on the next rebuild.
- Allow your own tools. Add the IP addresses of your monitoring and audit services to the firewall allow list, so a burst of checks does not lead to a ban.
- Know your host's limits. On shared plans, check the resource limits before traffic grows, not after visitors start seeing 508 pages.
- Re-audit after panel updates. Panel and PHP updates can change defaults. A quick HTTP Error Audit afterwards catches problems before search engines do.
Redirect rules in Plesk have their own guide, fixing redirects in Plesk, and certificate problems are covered in the SSL errors guide.
1. Where are the error logs in Plesk?
Open the domain from Websites and Domains and look for its Logs page, which lets you filter Apache and nginx logs by type and time. On disk, the files are usually in the domain logs folder, reachable at /var/www/vhosts/example.co.uk/logs/ and stored under /var/www/vhosts/system/. Read error_log for Apache and PHP problems and proxy_error_log for errors recorded by nginx, which is where 502 and 504 failures usually appear. Exact menu labels vary between Plesk versions.
2. Where do I find PHP errors in cPanel?
Look at the Errors page in the Metrics section, which shows recent entries from the Apache error log for your account. PHP errors are also often written to a file called error_log in the same folder as the script that failed, so check the public_html folder and the folders of any plugins or themes. If you have SSH access, searching for recently modified error_log files is a quick way to find the right one.
3. How do I restart PHP-FPM in Plesk?
Administrators can usually restart PHP services from the Services Management page under Tools and Settings. Over SSH, the Plesk-supplied PHP builds run as separate services named after their version, such as plesk-php83-fpm, which you can check and restart with systemctl. Saving the PHP settings for a domain also reloads that domain pool. On shared Plesk hosting without administrator access, ask your host to restart the service if the site returns 502 errors.
4. Why did my site break after changing the PHP version in the panel?
Each new PHP version removes functions and behaviours that older code relied on, and some plugins or themes are not updated in time. The error log will show a fatal error naming the file involved. Switching back to the previous version, if your host still offers it, restores the site quickly. The lasting fix is to update or replace the incompatible code, because hosts retire old versions and you will eventually have to move.
5. Can ModSecurity in Plesk or cPanel cause 403 errors?
Yes. ModSecurity rules block requests that look like attacks, and generic rule sets sometimes match normal form submissions, search queries or crawlers. The error log records the rule ID for each block. In Plesk you can usually switch off individual rules for a domain on its Web Application Firewall page. In cPanel you can turn ModSecurity off per domain, but asking your host to exclude only the specific rule is safer than disabling protection entirely.
6. What does 508 Resource Limit Is Reached mean?
It usually appears on shared hosting that uses CloudLinux, where each account has limits on CPU, memory and the number of simultaneous processes. When your site reaches one of those limits, extra requests are refused with a 508 page. It often happens during traffic spikes, heavy scheduled tasks or fast crawls. Check the Resource Usage page in cPanel if your host provides it, add page caching, and talk to your host if the limits are regularly reached.
7. Is it safe to edit Apache or nginx configuration files on a Plesk server?
Editing the files Plesk generates is risky, because Plesk rebuilds them from its own settings and can overwrite your changes without warning. Use the panel instead: the Apache and nginx Settings page for a domain usually has boxes for additional directives, and those are kept when the configuration is rebuilt. If you need a server-wide change, check the Plesk documentation for the supported way to add custom templates or include files.
The HTTP Error Audit requests every URL in your crawl scope, records the status code and response time, follows redirects and flags anything outside the 200 range, giving you the URLs and times to match against your panel logs.
Open HTTP Error Fixes โ