Hi WoofLover,
in general ownCloud is not capable to manage multiple tenants, but depending on your requirements you can have it done:
- Configure your webserver so both domains are pointing to the same document root
- Add both domains to trusted_domains in config.php
- Both domains now share the same instance (config, apps) and database.
- The main admin (you?) creates the groups company1 and company2 and two users company1admin and company2admin. Make them group administrator of the respective group, so they can manage their users. (see https://doc.owncloud.com/server/admin_manual/configuration/user/user_configuration.html#granting-administrator-privileges)
For both companies the user directories will reside in the same data directory (one user cannot browse the others’ directories, however).
If it is critical for your business to have separate data directories (for whatever reason), you have to set up two instances.