i have two apps and two site and each site have individual database created when i create site.
site one is meeting.dev and database is :bcad64afbf268a6a
site another one is cdcl.dev and database is :4c609e94a99a291b
Hosts file setting are:
site_config.json file for meeting:
site_config.json file for cdcl.dev
The problem is both the apps are using site_config.json file of cdcl.dev and its database.
cdcl.dev is create before and meeting.dev is create after one week.
i don’t know why both are using cdcl.dev connection and database. actually meeting.dev should use its connection and database.
is there any file connection setting which use for commond use.
please help me
thanks in advance .
have you created both sites using
bench new-site cdcl.dev
bench new-site meeting.dev
The subfolders in ./sites should not mix up in a standard config…
yes, i have created using bench new-site
i am new in frappe as wel in erpnext also… please guide me to solve this issue @lasalesi.
This might sound strange, but how do you know that they are using the same file? What happens if you run
bench mysql --site meeting.dev
Which db is loaded?
i have lots of user and data in cdcl.dev databases, but in meeting.dev one have default user only and dose not have any data.
so when i brows meeting.dev and used the user of cdcl.dev, i can open and display all the data of cdcl.dev.
And then i changed the database name in site_config.json file of cdcl.dev and try to brows both site but is said database error. this shows it is using cdcl.dev database.
I am not quite sure if I can follow… If you access http://meeting.dev, it should open the site from the respective ./sites. And in there, it will load the corresponding db connection. Maybe it helps to check whether the http request arrives properly in the nginx log files. And control your multitenancy configuration (refer to Multitenant Setup · frappe/bench Wiki · GitHub)
thank @lasalesi, i ll try.
Have you enabled multi-tenant setup yet?
bench config dns_multitenant on
sorry for let reply,
yes, it solved by clearing currentsite.txt. it should be empty.