WAF support for Web Apps

Mohit Nigam 1 Reputation point
2020-07-12T01:42:10.493+00:00

Here is my scenario:

I have multiple Web Apps (multi-tenant) in an App Service Plan as follows:

custA.azurewebsites.com
custB.azurewebsites.com

Above apps are same except they point to its won tenant DB. So custA talks to DBA, custB talks to custB.

I don't want to create individual custom domains for my customer. Users of CustomerA tenant would access the site using custA.mydomain.com. Users of customerB tenant would access the site using custB.mydomain.com

I would like to use the Application Gateway in front to route the traffic from my customers to their respective websites. Is that possible so that routing happens like this and how

custA.mydomain.com --> custA.azurewebsites.com
custB.mydomain.com --> custB.azurewebsites.com

Thanks

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,079 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Mubarak Tanseer 1 Reputation point Microsoft Employee
    2020-07-13T19:22:52.247+00:00

    Hello,

    Yes, you can implement your scenario using Azure Application Gateway

    Rule1 :: Listener1 --> HTTPSettings1 --> BackendPool1

    1. Create Listener1 with hostname custA.mydomain.com
    2. Leverage the option "Override with specific domain name" in HTTPSettings1 and mention
      "custA.azurewebsites.com" under the same
    3. Place the web app custA.azurewebsites.com in a distinct backend pool
    4. Configure Rule1 to bind Listener1, HTTPSettings1 and a BackendPool1

    Similar configurations needed for custB.mydomain.com

    Hope this helps !

    0 comments No comments

  2. GitaraniSharma-MSFT 49,581 Reputation points Microsoft Employee
    2020-07-31T08:40:03.537+00:00

    Hello @MohitNigam-9331 ,

    You may refer to the below articles for more information on how to configure multi-tenant back ends such as App service with Application Gateway:
    https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-web-app-overview
    https://learn.microsoft.com/en-us/azure/application-gateway/configure-web-app-portal

    In your scenario, you can make use of multi-site listeners and create 2 listeners with respective hostnames - custA.mydomain.com & custB.mydomain.com.
    Add App service as backend pool.
    Create HTTP settings for App service.
    Make use of Override host header in the request in your HTTP settings.
    Create Rule to tie the Listener, Backend Pool and HTTP Setting.

    For information on Troubleshooting App Service issues in Application Gateway, please refer:
    https://learn.microsoft.com/en-us/azure/application-gateway/troubleshoot-app-service-redirection-app-service-url

    Kindly let us know if the above helps or you need further assistance on this issue.


    Please don’t forget to "Accept the answer" wherever the information provided helps you, this can be beneficial to other community members.


Your answer

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