Create multiple sites which shares code

Hi.

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

/var/www/sito1/ (www1.yetopen.it)

/var/www/sito2/ (www2.yetopen.it)

/var/www/sito3/ (alt.yetopen.it)

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?

thanks

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.