Hi *.
I'm new with nginx, but I love it already. I have few working servers so far and learning something new every day. But for this problem I cannot find any solution.
Let's assume I have few apps on server, localhost for example:
http://localhost/app1/
http://localhost/app2/trunk/
http://localhost/app3/branches/3.14/
Folders for apps tend to change from time to time. In every app folder there's an main index.php file. In Apache I had .htaccess which for every not found folder/file was using mod_rewrting to pass url to index.php. When I have one app and server { } is set to root I just use location / { try_files $uri $uri/ /index.php?$args; }
But that cannot work here, I don't have /index.php, I have /app1/index.php and /app3/branches/3.14/index.php and so far. So how can I tell nginx to look for closest index.php in parent folders until it finds one? I'm guessing try_files ../index.php ../../index.php ../../../index.php would work, but it's definitely not pretty.