• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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