A cloud engineer needs to configure a single Azure Application Gateway v2 with one public frontend IP address to host two secure websites: `partners.contoso.com` and `customers.contoso.com`. Both websites must be accessible over HTTPS on port 443. Traffic to `partners.contoso.com/orders/*` must be routed to a backend pool named `PartnerOrdersPool`, while all other traffic for both websites must be routed to `DefaultWebPool`. Which configuration should the administrator implement?
- Configure a multi-site listener for each domain on port 443. Associate the listener for partners.contoso.com with a routing rule that uses a path map to route /orders/* traffic to PartnerOrdersPool and default traffic to DefaultWebPool. Associate the listener for customers.contoso.com with a routing rule that sends all traffic directly to DefaultWebPool.Cevap
- BConfigure a basic listener for each domain on port 443. Associate both listeners with a routing rule that routes all traffic to DefaultWebPool. Create a Private DNS Zone named contoso.com and link it to the virtual network to handle name resolution.
- CConfigure a basic listener on port 443. Associate it with a routing rule that directs traffic to DefaultWebPool. Configure a Network Security Group on the Application Gateway subnet with an inbound rule allowing port 443 at priority 4000 and an inbound deny rule at priority 1000.
- DConfigure a multi-site listener on port 443 using a wildcard host header *.contoso.com. Associate it with a routing rule that uses a path map. Configure a user-defined route on the Application Gateway subnet with a next hop type of Virtual Network Gateway to route traffic to the backend pools.
Cevap
Configure a multi-site listener for each domain on port 443. Associate the listener for partners.contoso.com with a routing rule that uses a path map to route /orders/* traffic to PartnerOrdersPool and default traffic to DefaultWebPool. Associate the listener for customers.contoso.com with a routing rule that sends all traffic directly to DefaultWebPool.
To host multiple websites on the same port and frontend IP address of an Azure Application Gateway, multi-site listeners must be configured with unique hostnames. The listener for the domain requiring path-based routing is associated with a routing rule that uses a path map to direct specific URLs to one backend pool and all other traffic to the default pool. The listener for the other domain, which requires no path-specific routing, is associated with a standard basic routing rule pointing to the default pool.
Adım Adım Çözüm
Anahtar Kavram
Configuring Multi-site Listeners and Path-based Routing Rules on Azure Application Gateway
Tahmini Süre:2m 30s