• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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