• 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!
  • 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 wordpress permalinks don't work with nginx

pacman94

New Pleskian
Hi, this rewrite rule doesn't work.
Code:
location / {
  try_files $uri $uri/ /index.php?$args;
}

this one works:
Code:
if (!-e $request_filename) {
rewrite ^.*$ /index.php?$args last;
}

why and what is the difference? boths are fine?
 
Hi pacman94,

actually, the ( correct / recommended! ) nginx directive:
Code:
    if (!-e $request_filename){
        rewrite ^(.*)$ /index.php break;
        }
OR
Code:
    if (!-e $request_filename) {
        rewrite ^/(.*)$ /index.php?q=$1 last;
        }

... are the basic rewrite directives, which should work in most cases. If you desire to learn more about NGINX directives, I recommend the official NGINX documentation at:



( Pls. keep in mind, that Plesk already uses ( standart ) location directives within the ( standart ) domain specific nginx configuration files, so that additional directives might conflict with already existing location directives. A location directive can only be used ONCE, so that "if" - statements can be used to add additional directives, without conflicting with earlier settings/configurations. ;) ).
 
Hi pacman94,

actually, the ( correct / recommended! ) nginx directive:
Code:
    if (!-e $request_filename){
        rewrite ^(.*)$ /index.php break;
        }
OR
Code:
    if (!-e $request_filename) {
        rewrite ^/(.*)$ /index.php?q=$1 last;
        }

... are the basic rewrite directives, which should work in most cases. If you desire to learn more about NGINX directives, I recommend the official NGINX documentation at:



( Pls. keep in mind, that Plesk already uses ( standart ) location directives within the ( standart ) domain specific nginx configuration files, so that additional directives might conflict with already existing location directives. A location directive can only be used ONCE, so that "if" - statements can be used to add additional directives, without conflicting with earlier settings/configurations. ;) ).

with this one can use nginx only for a site?
 
Hi Kingsley,

with this one can use nginx only for a site?
Your question is not clear enough, to be answered in general, as it depends very much on your ( unique ) content and your settings for your (sub)domain over the Plesk Control Panel.
 
Back
Top