How to do this?

Hi,

Multiple micro sites, each one has own config and DB,model, and controller, that each is accessible from subdomain name.

The root has shared items with other sites.

Is there any tutorial for that?

I don’t think there’s ready tutorial for your specific requirements.

Since you have separate configs for separate sub-domains, you’ll need to choose config based on sub-domain name. I guess you’d do that right in the index.php.

I see, and how about if the subdomain has API interface, can I mix url manager of restful and web ?

Both API and regular pages?

It should work. Put your rest rules under regular rules.