Hello,
I have a problem with my location rules.
I would like to generate a generic location rule for each folder that
contains a WordPress installation.
location / {
try_files $uri $uri/ /index.html;
}
location /user1/ {
try_files $uri $uri/ /user1/index.php?q=$uri&$args;
}
location ~* ^/(user2|user3)/ {
try_files $uri $uri/ /$1/index.php?q=$uri&$args;
}
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
If I go to localhost/user1/, I am redirected to the good Wordpress. But,
if I go to localhost/user2/ my browser downloads a file containing the
source code of index.php.
How to get it working?
Thank you.
Posted at Nginx Forum: