• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • 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.

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