Nginx + WordPress random install, how set config?

Issue

This Content is from Stack Overflow. Question asked by John Henrique

I have a php class that create a fresh WordPress on subfolder (site.com/demo/$IdRandom), but no WP install works here (all pages get 404 from site.com). How to solve this?

This installs are terminate after 2 days.

Every IdRandom have 6 digits

site.com/demo/326512

site.com/demo/982641

site.com/demo/598125

I try something like that, but no success

location /demonstracao/(d{6}|(.*))/ {
    rewrite ^/demonstracao/(.*)(.*) /demonstracao/$1/index.php?q=$2;
}

Any idea?

(I tried some times but I can`t put code here)



Solution

This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?