Show Theme based on URL called

Hey together,
we are using owncloud in our business for some years now to have a place to exchange data with clients and other businesses.
Now we have the need to have an owncloud instance for our sister company. Since we manage the whole IT for both companys, we had the idea to see if it's possible to have two active themes and have it decided from the URL called which theme is shown to the user:

Setup like following:

Nginx reverse Proxy -> redirects to Apache with owncloud when URL "" is called, now we want to implement "" redirects to the same Apache Server but to show another custom theme than the first call.

Is that possible? Can someone hint me which php or whatever files are responsible for the call to the Loginpage to have a look if i can figure it out?

Thanks in advance :slight_smile:

One idea - no guarantees. Have two instances which use the same database and the same storage (need NFS/SMB or clustered storage for that of course). Have one theme file in one instance and the other theme file in the other one. Diferent design, but both will use the same data. Two subdomains, done.
Two theme's in the same ownCloud instance what be news to me.
Let me know if this works :wink:

1 Like

Got it working by adding "$theme = ($SERVER['HTTPHOST']=="")?"themeA":"themeB";" under "getTheme()" in owncloud/lib/private/utils.php

This is in version 9.0.5 and i saw in 9.1 this is in a folder named legacy. Won't survive any updates for sure, but works for now.

Was a long story to find the right php-file...thank god grep exists.