Share via

Structuring Environment with Multiple Applications

Steve Young 0 Reputation points
2023-02-17T13:07:01.8766667+00:00

Hoping someone can give me some guidance on best way to setup this environment. Currently I setup an app subscription for windows app service. Within that I've placed each application, there's quite a few depending on product and it's intended environment (dev, uat, production). I've moved the DNS records to azure.

First question that I already know the answer to, there's no way to change the url assigned?

Next, I've created a custom domain called dev but this can only be used for one application. There doesn't appear to be a way to share a custom domain that's been created?

Which takes me to my final question, given the restrictions above, how can I mimic the desired structure below? I understand I'll need to use path directories to create a virtual path but how is the physical path of the application resolved since I can remote into the instance? Is it automatic once I select this app from visual studio?

acme.com

dev.acme.com/website1

dev.acme.com/website2

uat.acme.com/website1

acme.com/website1

acme.com/website2

I've looked at gateways as well as slots but I'm just getting everything configured and slowly migrating an existing application from another hosting company, that is setup like this, to Azure. Any assistance or direction would be appreciated. I'll also need to do something similar for our api environments.

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.


1 answer

Sort by: Most helpful
  1. Bryan Trach 17,842 Reputation points Microsoft Employee Moderator
    2023-02-22T05:32:03.4866667+00:00

    You can use custom domains in Azure App Service to host multiple applications under different subdomains. To achieve the desired structure, you can create a custom domain for each environment (dev, uat, production) and then use path-based routing to route requests to the appropriate application.

    For example, you can create a custom domain for dev.acme.com and then use path-based routing to route requests to dev.acme.com/website1 to the first website and dev.acme.com/website2 to the second website.

    To set up path-based routing, you can use the URL Rewrite module in Azure App Service. You can find more information on how to set up URL Rewrite in Azure App Service in this article: https://docs.microsoft.com/en-us/azure/app-service/configure-url-rewrite

    Regarding your question about the physical path of the application, when you deploy an application to Azure App Service, the application files are stored in a file system that is managed by Azure. You can access the file system using FTP or the Kudu console, but you cannot remote into the instance.

    When you deploy an application from Visual Studio, the physical path of the application is automatically resolved. You can find more information on how to deploy an application from Visual Studio to Azure App Service in this article: https://docs.microsoft.com/en-us/azure/app-service/app-service-web-get-started-dotnet

    I hope this helps! Let me know if you have any other questions.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.