Base solution for your next web application
Open Closed

Azure Publishing Public website + App #6763


User avatar
0
aggarwal created

Hi,

I have published the public website and app on Azure successfully. Both seems to have the same IP.

I want to link both to a single root domain - domain.com

Do you have any guide on how to do this?

I have mapped the public website to domain, however not sure how to map the mvc application.

Regards, Vikas


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

    Hi @aggarwal

    It seems like this is not related to AspNet Zero. But, you can't map two apps to same domain. You need to map one of them to a subdomain like admin.domain.com or a sub-website like domain.com/admin.

  • User Avatar
    0
    aggarwal created

    Thanks for reply.

    The issue was that I wanted to map the App to app.domian.com and derive the tenancy name from subdomain.

    Any pointer on what strategy should be used for that?

    Regards, Vikas

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @aggarwal

    If I understand you correctly tenants will access to {TENANCY_NAME}.domain.com to the admin application and you will host public website on domain.com.

    If that is the case, you can redirect *.domain.com to a static IP address which contains the admin website app. You can redirect domain.com to another IP address which contains the public website.

    You also need to create a custom implementation for https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.AspNetCore/AspNetCore/MultiTenancy/DomainTenantResolveContributor.cs and insert it to Configuration.MultiTenancy.Resolvers as teh first item. In your custom implementation return null value for the name you want to use for Host access.

    For example, you can access host.domain.com to login as host users to the system.