• 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

Question Site Working - But some errors in logs when using Nginx only & WordPress

Dec@de42

New Pleskian
Hey everyone,
I am currently trying to understand Plesk, but I'm not confident how the permalink structure in WordPress in combination with nginx only & wp-toolkit is meant to be handled.

I found a few threads in this forum about the 404 errors when using nginx only hosting with Plesk.
→ This used to be a problem when I am correct, but shouldn't be anymore because it got fixed in WP-Toolkit. (See here)

So, I thought to myself, why not let wp-toolkit handle the permalink stuff for me? But then I saw something suspicious. But first, my config:
1639601273847.png

So, I set up everything in default, no directives or anything, just nginx only hosting (no proxy checkbox).
I can reach the homepage just fine and only see status 200 codes in the logs:
1639600655518.pngBut I see errors in the logs when surfing on a sub-page (or, to be more specifically, anything but not the homepage):
1639600785570.png

Don't get me wrong, the Site and sub-pages are working just fine, but the error in the logs is something I can't explain to me.

  1. Is this normal, intentional, or a known bug?
  2. Should this be ignored because it doesn't impact performance or security?
  3. Would it be the better way just to disable the permalink handling by the Wp-Toolkit and do it on my own via additional directives?
Thanks for your input!
 
They said they fixed it in the last update but it only works for newly created sites AFTER the update was implemented. For older sites it's still not working!!!
 
They said they fixed it in the last update but it only works for newly created sites AFTER the update was implemented. For older sites it's still not working!!!
Hi,
Do you have lines like:
Code:
        set $sef_entry_point /;
        if ($uri ~* "^/wp_aqzkj/") {
                set $sef_entry_point "/wp_aqzkj/index.php?$args";
        }
        location @wpt_permalinks_fallback {
                try_files $uri $sef_entry_point;
        }
        error_page 404 = @wpt_permalinks_fallback;
        error_page 405 = @wpt_permalinks_fallback;
in your nginx config? (check in location /var/www/vhosts/system/example.com/conf/nginx.conf)

If not, try to reconfigure the domain or, for example, turn on and then turn off the hotlink protection on the WordPress website card in WPT, this should reconfigure web-server configs and apply all changes.
 
It should be working out of the box as long as you DO NOT HAVE THE CUSTOM ERROR DOCUMENTS enabled.

I've literally burn my head off trying to make it work until I found out that the "checkbox" for Custom Error Documents was enabled by default.

Be sure to disable Custom Error Documents from your website configuration (Hosting -> Custom Error Documents) (or subscription plans and sync).

They stated this on the update but they somehow neglect to mention the importance of this. If you have Custom Error Documents box enabled nothing will work and you'll be forced to use custom rules. They should seriously disable that option automatically when NGINX ONLY configuration is present. So lame that they leave it like that for anyone to smash their brains trying to make nginx only works out of the box.

Advice to Plesk: State a warning on Custom Error Documents or have that option greyed out when NGINX is the only web server. Why would you want an option there enabled that basically breaks the webserver ?
 

Attachments

  • Snipaste_2022-08-09_11-31-46.png
    Snipaste_2022-08-09_11-31-46.png
    129.9 KB · Views: 6
  • Snipaste_2022-08-09_11-32-13.png
    Snipaste_2022-08-09_11-32-13.png
    170.7 KB · Views: 6
Back
Top