I want to use single yii2 web application with multiple databases and URLs.
Actually, I have a single web application on a single web server and I want to give subscription of it to different user/companies. Each company will have it's own separate database. e.g.
company1 will want url xyz.com with database db1.
company2 will want url ab.xyz.com with database db2.
company3 will want url cd.xyz.com with database db3.
company4 will want url ef.xyz.com with database db4.
How can I implement the above scenario in yii2 web application? Also the url should be in respect to the companies.(e.g. if company3 logins then url should be cd.xyz.com/login if company4 wants to login then url should be ef.xyz.com/login and so on.)