Base solution for your next web application
Open Closed

multiple urls for same root instance #11105


User avatar
0
henryand created

we use ANZ10.1 Angular/Core combined

i would like to have two urls for the same published instance of our application. i have been able to accomplish this for multi-tenant by adding the tenancy placeholder. I would like to be able to do this for the root url. for instance, qa.domain.com and test.domain.com both pointing to the same instance. I don't know how to configure the serverrootaddress, approotaddress, remoteserverbaseurl, appbaseurl, etc

thanks, Rocco


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @henryand

    Would you like to use multiple URLs for tenant identification or just for app access ?

    Thanks,

  • User Avatar
    0
    henryand created

    the api could still be on one url. some users would have different urls to the same site, but the different urls would not indicate the tenant. for instance, group1.domain.com and group2.domain.com having the same tenant, or domain1.com and domain2.com sharing a published instance of the app.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @henryand

    In that case, it is possible. If you are using ABP 7.2, you can set;

    Configuration.Modules.AbpWebCommon().MultiTenancy.DomainFormat = "{0}.mydomain.com;{0}.mywebsite.com";
    

    This will allow you to use different domain formats for detecting the tenant. If you can't upgrade yo ABP 7.2, you can create a tenant resolver similar to https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.AspNetCore/AspNetCore/MultiTenancy/DomainTenantResolveContributor.cs with a different name and use it in your project.