• 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

Resolved Onyx 17.8, FPM+nginx Wordpress permalinks not working

Nick

New Pleskian
I've got Plesk 17.8 on linux and a Wordpress site using PHP 7.1 running as FPM served by nginx. I also have proxy mode and smart static file processing turned on and the following in the addtional nginx directives:

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 ^/(.*)$ /index.php?$1;
}

When enabling WP permalinks I get a 403 forbidden from nginx. In the proxy_error_log I get this:

2018/09/14 15:41:26 [error] 26696#0: *1 directory index of "/var/www/vhosts/example.com/httpdocs/test/" is forbidden, client: xxx.xxx.xxx.xxx, server: example.com, request: "GET /test/ HTTP/1.1", host: "example.com"

I've searched around but all the solutions I've tried do not work. I cannot get permalinks to work with this configuration. If permalinks are turned off, everything works great. Any help would be greatly appreciated.
 
Back
Top