• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved Vhosts nginx configuration misconfiguration for wordpress? (add index.html to pathname)

blueberry

Basic Pleskian
Hi,
After installing wordpress and disabling Apache, I have found that while URLs are accessible it returns an error in the Nginx error logs.
For some reasons, the code add the index file at the end of the URI. Here is a log example returned after visiting
Code:
https://inadoo.com/cest-un-nombre/
// As you can see Nginx look for the URI and add the first index file at the end of it.

1602530472336.png
The system also return a proper 200, that's why we don't see it. In other words, everytime I access a URL on a nginx only installation, I get a 200 and also an error recorded in the Nginx error log. I guess the problem is located at /etc/nginx/plesk.conf.d/vhosts/xxxx.com.conf where the nginx directives are located.

I have not added anything to the Nginx additional directives.
 
Last edited:
thank you

so I added
1602562317856.png
then I called the URL
1602562527225.png
And unfortunately, after visiting the logs, the problem is still there. and by the way, it happens with all my domains using nginx on my server.
1602562484235.png

Here is how to repeat the problem:
1. Install wordpress on a domain using Plesk
2. Disable Apache by unchecking Proxy mode in the category "Apache & nginx settings.
3. In wordpress administration, settinbgs>permalinks : set to permalink /sample-post/
3. visit a URL of the website
4. Checks the logs, for a visited URL you should see two entry, 1 file not found error and one 200 for the access
 
Last edited:
Problem was solved by adding

if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php;
}

At the end of nginx additional settings
 
Last edited:
If you want to add other regex directives with it, you must add the following:
Code:
location / {

#add location regex here



location ~* "^/(.+)(!wp-admin|wp-login|wp-content|wp-includes)/$" {
        if (!-e $request_filename) {
            rewrite ^/(.+)/$ /index.php last;
        }
    }


}
 
Back
Top