0

I'm running an Nginx server with multiple WordPress installs in subdirectories, for instance:

/var/www/lovelyfolder

I had assumed, perhaps naively, that the following code (in default.conf) would apply to all subfolders in the root:

        location / {
                    try_files $uri $uri/ /index.php?q=$uri&$args;
    }

BUT, in order to get permalinks to work for the specific WordPress install in that folder I have to add the following:

        location /lovelyfolder/ {
                    try_files $uri $uri/ /lovelyfolder/index.php?q=$uri&$args;
    }

Is there a way of altering the first code so that it automatically applies to all new and existing subdirectories, or am I stuck having to manually add the above for each individual subdirectory?

0 Answers0