19 ‐ Application_Gateway_In_Azure - SanjeevOCI/Azure GitHub Wiki
🌐 Application Gateway in Azure
This lab demonstrates the steps to set up an Azure Application Gateway, including the creation of necessary resources and configuration of a backend web server.
🧱 Prerequisites
- An active Azure subscription
- Basic understanding of Azure networking components
🔹 Step 1: Create a Resource Group
- Navigate to the Azure Portal.
- Search for Resource groups and click + Create.
- Fill in the required details:
- Subscription: Select your subscription.
- Resource Group: Enter a name (e.g.,
AppGatewayRG
). - Region: Choose a region (e.g.,
East US
).
- Click Review + Create, then Create.
📷 *Refer to Screenshot:
🔹 Step 2: Create a Virtual Network and Subnets
- In the Azure Portal, search for Virtual networks and click + Create.
- Fill in the required details:
- Name: Enter a name (e.g.,
AppGatewayVNet
). - Address space: Define the address space (e.g.,
10.0.0.0/16
).
- Name: Enter a name (e.g.,
- Under Subnets, create two subnets:
- AppGatewaySubnet: e.g.,
10.0.1.0/24
- BackendSubnet: e.g.,
10.0.2.0/24
- AppGatewaySubnet: e.g.,
- Click Review + Create, then Create.
📷 *Refer to Screenshot:
🔹 Step 3: Create a Virtual Machine
- Navigate to Virtual machines and click + Create.
- Fill in the required details:
- Name: Enter a name (e.g.,
BackendVM
). - Region: Same as the Resource Group.
- Image: Choose a Linux distribution (e.g.,
CentOS
). - Size: Select an appropriate size.
- Authentication type: Choose SSH public key or password.
- Inbound port rules: Allow HTTP (80) and SSH (22).
- Name: Enter a name (e.g.,
- Under Networking, place the VM in the BackendSubnet of
AppGatewayVNet
. - Click Review + Create, then Create.
📷 *Refer to Screenshot:
After creating the VM, we need to follow the below steps :
- Login to the VM and sudo to root.
- Install and Enable httpd service in VM.
- Create an index file (/var/www/html/index.html)
- Enable firewalld service in VM.
- Add port 80 in firewall.
Ensure that index.html is accessible on web
Create a Public IP Address
Create a Public IP for the Application Gateway.
Create Application Gateway
Now we have have to create the Application Gateway , Fill the Basic Part.
In the Frontends section, select the Public IP
In the Backends section, Click on Add a Backend Pool
Fill the below details and click on Add
Now we can see the backend pool is Added.
Click on Next, In the Configuration section, we will connect the frontends and backend pools
Click on Add a routing role, Now In Listener section, fill the below details ,
And in Backend Targets section, select the Backend Target and for Backend Settings, click on Add new
Fill the below details in Backend settings,
Now we have added both the Listener and Backend Targets, Click on Add.
Now the Routing rule is added.
Click on Next , Review and Create.
It will take 5 mins to get created, after that we can see the Application Gateway is created,