NC 21 - Dual Domain Setup

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version 21
Linux 2 ec2 instance t3.xlarge instance sixe
nginx version: 1.18.0
PHP 8.0.2

The issue you are facing:
I’m trying to have my NC instance setup for users to access from 2 different domains. Currently i have:


The only thing I was trying to accomplish is having two different themes setup. One theme for our first domain, and one theme for our second domain. Populating based upon which url you’re visiting.

However when you visit the 2nd domain, and try a direct login you get logged in OK but you cannot access any of our files in certain groups we have setup. Is there another file somewhere that I have to add the 2nd domain to?

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

  1. Log in as a direct login user on the 2nd domain
  2. After adding them to the appropriate group you get bounced around and a bunch of this operation is forbidden errors
  3. Cannot access any of the files

The output of your Nextcloud log in Admin > Logging:
[PHP] Error: Error: usort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero at /var/www/nextcloud/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php#101 at <>

  1. <>
    OC\Log\ErrorHandler::onError(8192, “usort(): Return … o”, “/var/www/nextcl … p”, 101)
  2. /var/www/nextcloud/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php line 101
    usort([OCP\AppFramewor … }], Closure {})
  3. /var/www/nextcloud/apps/files_sharing/lib/Controller/ShareController.php line 531
    OCP\AppFramework\Http\Template\PublicTemplateResponse->setHeaderActions([OCP\AppFramewor … }])
  4. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 218
  5. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 127
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Files_Sharin … {}, “showShare”)
  6. /var/www/nextcloud/lib/private/AppFramework/App.php line 157
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Files_Sharin … {}, “showShare”)
  7. /var/www/nextcloud/lib/private/Route/Router.php line 302
    OC\AppFramework\App::main(“OCA\Files_Shar … r”, “showShare”, OC\AppFramework\ … {}, {token: "EyFLTXA … "})
  8. /var/www/nextcloud/lib/base.php line 993
  9. /var/www/nextcloud/index.php line 37

GET /s/EyFLTXAz2iJ8giT
from at 2021-03-01T22:27:54+00:00

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):


Any help would be greatly appreciated. :slight_smile: Thanks!!

Using the search function of this forum leads me to the following thread: