Configure complex dynamic urls

Hi I’ve been trying to configure an nginx to accept a complex dynamic
so far I got this. (, this what I got so

Here is the deal, the url should be working like these: - will be the normal domain with information, user
and user authentication. (,

the user can create database from their account., view the database information, and list all the database htey have created

so far everything can be done and I can manage this.

The issue start here. to the user manage their database, create tables,
I want the url format to be: http://{user}{database}, this
should proxy to a system/program that handles the database management
should be hidden and only accessed by the url mention before).

If user go to http://{user}{database}/login, they are
going to the another database manager, pre-filling the username and
to be used.

Thanks for you help in advance

PS. is using nginx+php and the database management software
using htaccess+php+nginx

Posted at Nginx Forum: