Question

Difficulty: MediumConfigure Azure Application Gateway

You plan to configure an Azure Application Gateway v2 to handle traffic for a web application. You must ensure that all incoming HTTP requests on port 80 are redirected to HTTPS on port 443 before being forwarded to the backend pool.

Which two of the following components must you configure to accomplish the HTTP-to-HTTPS redirection? (Select two.)

  1. An HTTP listener configured on port 80.Answer
  2. A request routing rule that uses a redirect configuration targeting the HTTPS listener.Answer
  3. C
    A backend setting with a custom redirection policy targeting port 443.
  4. D
    A custom health probe configured to monitor HTTPS port 443 on the backend servers.

Answer

To redirect HTTP traffic to HTTPS, you must configure an HTTP listener on port 80 to receive the incoming traffic and a request routing rule that uses a redirect configuration targeting the HTTPS listener.
Configuring an HTTP listener on port 80 and a request routing rule that uses a redirect configuration targeting the HTTPS listener allows the Application Gateway to receive port 80 traffic and redirect it to the HTTPS listener before it ever reaches the backend pool.

Step-by-Step Solution

1
Create an HTTP listener on port 80.
The Application Gateway actively listens for and receives incoming HTTP requests on port 80.
You must capture the unencrypted HTTP traffic before you can apply redirection logic to it.
2
Configure the request routing rule associated with the HTTP listener.
The routing rule is configured to use a redirection type and target the HTTPS listener.
This links the incoming HTTP traffic to the redirection action, sending clients to the secure endpoint.

Key Concept

HTTP-to-HTTPS redirection on Azure Application Gateway requires routing traffic from an HTTP listener to an HTTPS listener using a request routing rule with redirect configuration.
Rate this question