Create Pull Request
| Date | Scan | Status | Result |
|---|---|---|---|
| 2025-07-12 23:44 | #41 | cancelled |
Biased
|
| 2025-07-12 00:58 | #8 | cancelled |
Clean
|
| 2025-07-10 05:06 | #7 | processing |
Clean
|
| 2025-07-09 23:22 | #6 | cancelled |
Clean
|
3. Create a second virtual machine and install IIS using the steps that you previously completed. Use *fabrikamVM* for the virtual machine name and for the **VMName** setting of the **Set-AzVMExtension** cmdlet.
### Add backend servers to backend pools
1. Select **All resources**, and then select **myAppGateway**.
2. Select **Backend pools** from the left menu.
3. Select **contosoPool**.
4. Under **Target type**, select **Virtual machine** from the drop-down list.
5. Under **Target**, select the **contosoVM** virtual machine's network interface from the drop-down list.

6. Select **Save**.
7. Repeat to add the *fabrikamVM* and interface to the *fabrikamPool*.
Wait for the deployment to complete before proceeding to the next step.
## Edit your hosts file for name resolution
After the application gateway is created with its public IP address, you can get the IP address, and use it to edit your hosts file to resolve `www.contoso.com` and `www.fabrikam.com`. In a production environment, you could create a `CNAME` in DNS for name resolution.
1. Select **All resources**, and then select **myAGPublicIPAddress**.

2. Copy the IP address and use it as the value for new entries your `hosts` file.
1. On your local machine, open an administrative command prompt, and navigate to `c:\Windows\System32\drivers\etc`.
1. Open the `hosts` file, and add the following entries, where `x.x.x.x` is the application gateway's public IP address:
1. Save the file. 1. Run the following commands to load and display the changes to your hosts file:
3. Create a second virtual machine and install IIS using the steps that you previously completed. Use *fabrikamVM* for the virtual machine name and for the **VMName** setting of the **Set-AzVMExtension** cmdlet.
### Add backend servers to backend pools
1. Select **All resources**, and then select **myAppGateway**.
2. Select **Backend pools** from the left menu.
3. Select **contosoPool**.
4. Under **Target type**, select **Virtual machine** from the drop-down list.
5. Under **Target**, select the **contosoVM** virtual machine's network interface from the drop-down list.

6. Select **Save**.
7. Repeat to add the *fabrikamVM* and interface to the *fabrikamPool*.
Wait for the deployment to complete before proceeding to the next step.
## Edit your hosts file for name resolution
After the application gateway is created with its public IP address, you can get the IP address, and use it to edit your hosts file to resolve `www.contoso.com` and `www.fabrikam.com`. In a production environment, you could create a `CNAME` in DNS for name resolution.
1. Select **All resources**, and then select **myAGPublicIPAddress**.

2. Copy the IP address and use it as the value for new entries your `hosts` file.
1. On your local machine, open an administrative command prompt, and navigate to `c:\Windows\System32\drivers\etc`.
1. Open the `hosts` file, and add the following entries, where `x.x.x.x` is the application gateway's public IP address:
1. Save the file. 1. Run the following commands to load and display the changes to your hosts file: