• 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.

Issue Rewrite subfolder nginx

Marcio Nunes

Basic Pleskian
Hi,
We need to develop some website multi language. Example: /en and /es

When install new Joomla or WordPress in subfolders, don't work the rewrite URL nginx. Show 404 in URL /en/anycontent

Joomla and WordPress have support to multi language, but in this situation, need new web (components specific don't support multi currency, USD and EUR).

How fix? What's directive nginx can use to work URL rewrite for all subfolder?

Thanks
 
Marcio I really hope you solved your situation by now, but I run into your topic and there's no solution yet. I ran into a comparable issue.

I'm going to
1) explain my situation
2) explain the solution

I had a site at domain
a WP domain/sub1
multple WPs at domain/sub1/sub2

So I needed a regex which allows for all three possibilities.
Here's the edited standard

if (!-e $request_filename) {
set $test P;
}
if ($uri !~ ^/(plesk-stat|webstat|webstat-ssl|ftpstat|anon_ftpstat|awstats-icon|internal-nginx-static-location)) {
set $test "${test}C";
}
if ($test = PC) {

rewrite ^((/\w+/)?(\w+)?)?(.*)$ $2$3/index.php?$4;

}


So it makes the subdomain and subsubdomain optional and saves them in variables by group capture.

this works for domain and subsubdomain but not subdomain.

Obviously it can't tell the difference between

domain/sub1/hello-world

and

domain/sub1/sub2

Maybe that's just not possible. I 'solved' the issue by moving all from the subfolder to the sub subfolder (nvm the nomenclature and conflagration between subdomain and folder)

For single-dept subdomains, I think you should use

rewrite ^(/\w+/?)?(.*)$ $1/index.php?$2;
 
Last edited:
Back
Top