Create multiple sites which shares code


On a single server I’d like to deploy three different websites, something like this:

/var/www/sito1/ (

/var/www/sito2/ (

/var/www/sito3/ (

All the sites will access the SAME database, thus having the same controllers models and so on.

Can I accomplish this, whithout copying code here and there?


you can share models folder or modules folder (just point same directory in config file). sharing only models is good when you have same database but different site logic. Shared modules can contain models, controller, views and so on. Views from module can be of course wrapped by layout specific for site.