Azure Documentation

Configuring Azure Application Gateway

This document provides a comprehensive guide to configuring your Azure Application Gateway. We'll cover essential components like listeners, rules, backend pools, health probes, and security settings.

Key Configuration Components

1. Listeners

Listeners are essential for receiving incoming traffic. You can configure listeners for different protocols (HTTP/HTTPS), ports, and hostnames.

For more details, refer to the Listeners Configuration page.

2. Request Routing Rules

Routing rules define how incoming requests are directed to backend resources. They associate a listener with a backend pool and a health probe.

Learn more about Request Routing Rules.

3. Backend Pools

A backend pool is a collection of virtual machines, virtual machine scale sets, or Azure App Services that Application Gateway routes traffic to.

See Backend Pool Configuration for setup instructions.

4. Health Probes

Health probes are used to monitor the health of backend servers. Application Gateway uses this information to send traffic only to healthy instances.

Explore Health Probe Settings.

5. HTTP Settings

These settings dictate how Application Gateway communicates with the backend servers after receiving a request.

6. SSL Certificates

For HTTPS configurations, secure your Application Gateway with SSL/TLS certificates.

For detailed guidance on SSL Offloading.

Example Configuration Snippet (JSON)

Below is a simplified example of an Application Gateway configuration resource in JSON format:

{
    "type": "Microsoft.Network/applicationGateways",
    "apiVersion": "2020-11-01",
    "name": "myApplicationGateway",
    "location": "West US",
    "properties": {
        "sku": {
            "name": "Standard_v2",
            "tier": "Standard_v2"
        },
        "gatewayIPConfigurations": [
            {
                "name": "appGatewayIpConfig",
                "properties": {
                    "subnet": {
                        "id": "/subscriptions/.../resourceGroups/.../providers/Microsoft.Network/virtualNetworks/.../subnets/..."
                    }
                }
            }
        ],
        "frontendIPConfigurations": [
            {
                "name": "publicFrontendIPConfig",
                "properties": {
                    "publicIPAddress": {
                        "id": "/subscriptions/.../resourceGroups/.../providers/Microsoft.Network/publicIPAddresses/..."
                    }
                }
            }
        ],
        "frontendPorts": [
            {
                "name": "frontendPort443",
                "properties": {
                    "port": 443
                }
            }
        ],
        "backendAddressPools": [
            {
                "name": "appBackendPool",
                "properties": {
                    "backendAddresses": [
                        {
                            "ipAddress": "10.0.0.4"
                        },
                        {
                            "ipAddress": "10.0.0.5"
                        }
                    ]
                }
            }
        ],
        "httpListeners": [
            {
                "name": "httpsListener",
                "properties": {
                    "frontendPort": {
                        "id": ".../frontendPorts/frontendPort443"
                    },
                    "frontendIPConfiguration": {
                        "id": ".../frontendIPConfigurations/publicFrontendIPConfig"
                    },
                    "protocol": "Https",
                    "sslCertificate": {
                        "id": ".../sslCertificates/mySslCert"
                    }
                }
            }
        ],
        "requestRoutingRules": [
            {
                "name": "rule1",
                "properties": {
                    "httpListener": {
                        "id": ".../httpListeners/httpsListener"
                    },
                    "backendAddressPool": {
                        "id": ".../backendAddressPools/appBackendPool"
                    },
                    "backendHttpSettings": {
                        "id": ".../httpSettingsCollection/httpSettings1"
                    }
                }
            }
        ],
        "httpSettingsCollection": [
            {
                "name": "httpSettings1",
                "properties": {
                    "protocol": "Http",
                    "port": 80
                }
            }
        ]
        // ... other configurations like SSL certificates, WAF policies, etc.
    }
}

This JSON snippet illustrates the basic structure. For complete details and advanced configurations, consult the Azure Resource Manager (ARM) template documentation.

Next Steps

Explore the following topics to deepen your understanding: