Skip to content

Commit 833cc39

Browse files
committed
Testing complete.
1 parent bf38825 commit 833cc39

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

articles/frontdoor/standard-premium/create-front-door-cli.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,22 @@ az appservice plan create \
7575

7676
### Create web apps
7777

78-
Running the following commands will create a web app in each of the app service plans in the previous step. Web app names have to be globally unique.
78+
Run [az webapp create](/cli/azure/webapp#az_webapp_create&preserve-view=true) to create a web app in each of the app service plans in the previous step. Web app names have to be globally unique.
7979

80-
Create web app with [az webapp create](/cli/azure/webapp#az_webapp_create&preserve-view=true):
80+
Run [az webapp list-runtimes](/cli/azure/webapp#az_webapp_create&preserve-view=true) to see a list of built-in stacks for web apps.
8181

8282
```azurecli
8383
az webapp create \
84-
--name WebAppContoso-1 \
84+
--name WebAppContoso-001 \
8585
--resource-group myRGFDCentral \
86-
--plan myAppServicePlanCentralUS
86+
--plan myAppServicePlanCentralUS \
87+
--runtime "DOTNETCORE|2.1"
8788
8889
az webapp create \
89-
--name WebAppContoso-2 \
90+
--name WebAppContoso-002 \
9091
--resource-group myRGFDEast \
91-
--plan myAppServicePlanEastUS
92+
--plan myAppServicePlanEastUS \
93+
--runtime "DOTNETCORE|2.1"
9294
```
9395

9496
Make note of the default host name of each web app so you can define the backend addresses when you deploy the Front Door in the next step.
@@ -131,11 +133,11 @@ Run [az afd origin create](/cli/azure/afd/origin#az_afd_origin_create) to add an
131133
```azurecli
132134
az afd origin create \
133135
--resource-group myRGFDCentral \
134-
--host-name https://webappcontoso-1.azurewebsites.net
136+
--host-name webappcontoso-1.azurewebsites.net
135137
--profile-name contosoafd \
136138
--origin-group-name og1 \
137139
--origin-name contoso1 \
138-
--origin-host-header https://webappcontoso-1.azurewebsites.net \
140+
--origin-host-header webappcontoso-1.azurewebsites.net \
139141
--priority 1 \
140142
--weight 1000 \
141143
--enabled-state Enabled \
@@ -147,12 +149,12 @@ Repeat this step and add your second origin.
147149

148150
```azurecli
149151
az afd origin create \
150-
--resource-group myRGFDEast \
151-
--host-name https://webappcontoso-2.azurewebsites.net
152+
--resource-group myRGFDCentral \
153+
--host-name webappcontoso-2.azurewebsites.net
152154
--profile-name contosoafd \
153155
--origin-group-name og1 \
154-
--origin-name contoso1 \
155-
--origin-host-header https://webappcontoso-2.azurewebsites.net \
156+
--origin-name contoso2 \
157+
--origin-host-header webappcontoso-2.azurewebsites.net \
156158
--priority 1 \
157159
--weight 1000 \
158160
--enabled-state Enabled \
@@ -170,7 +172,7 @@ az afd route create \
170172
--endpoint-name contoso-frontend \
171173
--profile-name contosoafd \
172174
--route-name route1 \
173-
--https-redirect False \
175+
--https-redirect Enabled \
174176
--origin-group og1 \
175177
--supported-protocols Https \
176178
--link-to-default-domain Enabled \
@@ -179,7 +181,7 @@ az afd route create \
179181

180182
## Create a new security policy
181183

182-
## Create a WAF policy
184+
### Create a WAF policy
183185

184186
Run [az network front-door waf-policy create](/cli/azure/network/front-door/waf-policy#az_network_front_door_waf_policy_create) to create a WAF policy for one of your resource groups.
185187

@@ -189,14 +191,15 @@ Create a new WAF policy for your Front Door. This example creates a policy that'
189191
az network front-door waf-policy create
190192
--name contosoWAF /
191193
--resource-group myRGFDCentral /
194+
--sku Premium_AzureFrontDoor
192195
--disabled false /
193196
--mode Prevention
194197
```
195198

196-
> [!NOTE]
197-
> If you select `Detection` mode, your WAF doesn't block any requests.
199+
> [!NOTE]
200+
> If you select `Detection` mode, your WAF doesn't block any requests.
198201
199-
## Create a security policy
202+
### Create the security policy
200203

201204
Run [az afd security-policy create](/cli/azure/afd/security-policy#az_afd_security_policy_create) to apply your WAF policy to the endpoint's default domain.
202205

@@ -205,21 +208,19 @@ az afd security-policy create \
205208
--resource-group myRGFDCentral \
206209
--profile-name contosoafd \
207210
--security-policy-name contososecurity \
208-
--domains /subscriptions/mysubscription/resourcegroups/myRGFDCentral/providers/Microsoft.Cdn/profiles/contosoafd/afdEndpoints/contoso-frontend \
211+
--domains /subscriptions/mysubscription/resourcegroups/myRGFDCentral/providers/Microsoft.Cdn/profiles/contosoafd/afdEndpoints/contoso-frontend.z01.azurefd.net \
209212
--waf-policy /subscriptions/mysubscription/resourcegroups/myRGFDCentral/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/contosoWAF
210213
```
211214

212215
## Verify Azure Front Door
213216

214217
When you create the Azure Front Door Standard/Premium profile, it takes a few minutes for the configuration to be deployed globally. Once completed, you can access the frontend host you created. In a browser, go to `contoso-frontend.z01.azurefd.net`. Your request will automatically get routed to the nearest server from the specified servers in the origin group.
215218

216-
If you created these apps in this quickstart, you'll see an information page.
217-
218219
To test instant global failover, we'll use the following steps:
219220

220221
1. Open a browser, as described above, and go to the frontend address: `contoso-frontend.azurefd.net`.
221222

222-
2. In the Azure portal, search for and select *App services*. Scroll down to find one of your web apps, **WebAppContoso-001** in this example.
223+
2. In the Azure portal, search for and select *App services*. Scroll down to find one of your web apps, **WebAppContoso-1** in this example.
223224

224225
3. Select your web app, and then select **Stop**, and **Yes** to verify.
225226

0 commit comments

Comments
 (0)