I have a web application on apache/httpd. By copying this application and putting it in a different directory under document root, I creat a new instance of that application. I do set up a new database for each instance as well.
I use database realm for authenticating the user.
The problem is that I use MySQL for storing the user credentials and the database information is stored in the httpd.conf, that is global for all instances, like this (no password yet):
DBDriver mysql DBDParams "host=server_host port=3306 dbname=db_name user=user_name" DBDMin 4 DBDKeep 8 DBDMax 20 DBDExptime 300
I would like to use different dbname for the different instances, or do some mapping for which database to use for authentication, depending on what instance of the application that is accessed.
Is it possible to solve using the built-in support for authentication in Apache2? If not, what strategies can be applied for the solution?