• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Wordpress subpages returning 404 (index.html) error after nginx restart

PrimeSites

New Pleskian
Server operating system version
Ubuntu 20.04.5 LTS
Plesk version and microupdate number
Plesk Obsidian 18.0.47 Update #5
We have an established site that have been returning errors since an nginx restart.
The homepage loads fine, but any sub-page / post returns a 404.
Logs showing entries like e.g.:
(nginx error) 23886#0: *1 "/var/www/vhosts/working.dir/example.com/whats-on/index.html" is not found (2: No such file or directory).
Any help much appreciated.
 
I've taken a clone of the site (via WordPress Toolkit) on a subdomain and the clone works fine, with all sub-pages loading as per normal.
Comparison between the original instance (with problem) and cloned instance show no differences for:
- PHP Settings
- WAF
- SSL/TLS Certs
- Apache & Nginx Settings
 
PHP version is 8.1.12. Changing from "FPM app served by nginx" to "FPM app served by Apache", followed by nginx & Apache restarts did the trick.
Website has now returned to normal operation.
 
When you use PHP via Nginx you also need to transcribe the .htaccess rewrite rules that your site uses and place them into the "Additional nginx directives" section of your configuration in nginx syntax. Please see this article for more information:
 
Back
Top