Skip to content

Commit d44a3cf

Browse files
authored
update escape characters based on MVP feedback
1 parent b462028 commit d44a3cf

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

articles/app-service/configure-common.md

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn to configure common settings for an App Service app. App sett
44
keywords: azure app service, web app, app settings, environment variables
55
ms.assetid: 9af8a367-7d39-4399-9941-b80cbc5f39a0
66
ms.topic: article
7-
ms.date: 01/13/2022
7+
ms.date: 07/11/2022
88
ms.custom: "devx-track-csharp, seodec18, devx-track-azurecli"
99
ms.devlang: azurecli
1010

@@ -516,27 +516,29 @@ By default, App Service starts your app from the root directory of your app code
516516

517517
# [Azure CLI](#tab/cli)
518518

519-
The following example sets the root path `/` to the `public` subdirectory (which works for Laravel), and also adds a second virtual application at the `/app2` path. To run it, change `<group-name>` and `<app-name>`.
519+
The following example sets the root path `/` to the `public` subdirectory (which works for Laravel), and also adds a second virtual application at the `/app2` path. To run it, create a file called `json.txt` with the following contents.
520+
521+
```json
522+
[
523+
{
524+
"physicalPath"':' "site\\wwwroot\\public",
525+
"preloadEnabled"':' false,
526+
"virtualDirectories"':' null,
527+
"virtualPath"':' "/"
528+
},
529+
{
530+
"physicalPath"':' "site\\wwwroot\\app2",
531+
"preloadEnabled"':' false,
532+
"virtualDirectories"':' null,
533+
"virtualPath"':' "/app2"
534+
}
535+
]
536+
```
537+
538+
Change `<group-name>` and `<app-name>` for your resources and run the following command. Be aware of escape characters when running this command. For more information on escape characters, see [Tips for using the Azure CLI successfully](/cli/azure/use-cli-effectively).
520539

521540
```azurecli-interactive
522-
echo -n '[
523-
{
524-
"physicalPath"':' "site\\wwwroot\\public",
525-
"preloadEnabled"':' false,
526-
"virtualDirectories"':' null,
527-
"virtualPath"':' "/"
528-
},
529-
{
530-
"physicalPath"':' "site\\wwwroot\\app2",
531-
"preloadEnabled"':' false,
532-
"virtualDirectories"':' null,
533-
"virtualPath"':' "/app2"
534-
}
535-
]' > json.txt
536-
537-
json=$(cat json.txt)
538-
539-
az resource update --resource-group <group-name> --resource-type Microsoft.Web/sites/config --name <app-name>/config/web --set properties.virtualApplications="$json"
541+
az resource update --resource-group <group-name> --resource-type Microsoft.Web/sites/config --name <app-name>/config/web --set properties.virtualApplications="@json.txt"
540542
```
541543

542544
# [Azure PowerShell](#tab/ps)

0 commit comments

Comments
 (0)