Starts in:
2 DAYS
0 HR
0 MIN
45 SEC
Starts in:
2 D
0 H
0 M
45 S
Open Closed

How to config separate domain for each tenant #5570


User avatar
0
datdv1 created

• ABP Framework version: v7.3.2 • UI Type: Angular • Database System: MongoDB • Auth Server Separated (for Angular): yes Hi Support Team, Our solution is currently deployed in Azure Kubernetes Service. We use SaaS module of ABP Commercial (version 7.3.2). We need to have separate domain for the host side as well as for each tenant. For example, we have 3 domains as below:

  • Host side: logiplat.net
  • Tennant 1: ticogroup.com
  • Tenant 2: everwin.com

Could you help me how to configure the domains for the host and each tenant?

Here is config angular:

Here is config backend:

Here is config authen:


5 Answer(s)
  • User Avatar
    0
    jfistelmann created

    Hey,

    may this be what you're looking for?

    https://community.abp.io/Videos/extend-tenant-management-and-add-custom-host-to-your-abp-app-lwmi9lr5

  • User Avatar
    0
    datdv1 created

    Hi jfistelmann

    Currently I extend from this class TenantResolveContributorBase Then I can get the scope by using "context.ServiceProvider.CreateScope()" I can get the current tenant, but i cannot change tenant based on the teant that I get Am I right to use the code below? Could you tell me how to change the current tenant info?

    here is the code:

  • User Avatar
    0
    jfistelmann created

    Try to do it like described here:

    https://blog.antosubash.com/posts/abp-extend-tenant-with-custom-host (the blog post that's behind the thing I shared before).

    In addition:

    You do not need to create a scope, you can just use contexts ServiceProvider.

    Do not nest so deep, use early exits to reduce nestings and increase readability.

    if (string.isNullOrEmpty(host)
    {
        return;
    }
    
  • User Avatar
    0
    datdv1 created

    Hello I would like to ask about angular in multi tenants Could you please tell me how to config seprate domain for each tenant for angular? Should I config multi dynamic-env-json? Do you have any sample repository?

  • User Avatar
    0
    jfistelmann created

    here are samples: https://github.com/abpframework/abp-samples/tree/master/DomainTenantResolver

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06