Skip to content

Commit 5a57a89

Browse files
authored
Merge pull request #197960 from MicrosoftDocs/main
5/11 PM Publish
2 parents d241d27 + 59d8aa6 commit 5a57a89

File tree

300 files changed

+4152
-2627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

300 files changed

+4152
-2627
lines changed

.openpublishing.redirection.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3277,7 +3277,7 @@
32773277
"source_path_from_root": "/articles/app-service/scenario-secure-app-clean-up-resources.md",
32783278
"redirect_url": "/azure/app-service/scenario-secure-app-access-storage#clean-up-resources",
32793279
"redirect_document_id": false
3280-
},
3280+
},
32813281
{
32823282
"source_path_from_root": "/articles/app-service/quickstart-nodejs-uiex.md",
32833283
"redirect_url": "/azure/app-service/quickstart-nodejs",
@@ -18094,7 +18094,7 @@
1809418094
"redirect_document_id": true
1809518095
},
1809618096
{
18097-
"source_path_from_root": "/articles/lab-services/classroom-labs/tutorial-setup-classroom-lab.md",
18097+
"source_path_from_root": "/articles/lab-services/classroom-labs/tutorial-setup-classroom-lab.md",
1809818098
"redirect_url": "/azure/lab-services/tutorial-setup-classroom-lab",
1809918099
"redirect_document_id": true
1810018100
},
@@ -23375,7 +23375,7 @@
2337523375
},
2337623376
{
2337723377
"source_path_from_root": "/articles/app-service-web/sendgrid-dotnet-how-to-send-email.md",
23378-
"redirect_url": "/azure/sendgrid-dotnet-how-to-send-email",
23378+
"redirect_url": "https://docs.sendgrid.com/for-developers/partners/microsoft-azure-2021#create-a-twilio-sendgrid-account",
2337923379
"redirect_document_id": false
2338023380
},
2338123381
{
@@ -27108,6 +27108,11 @@
2710827108
"redirect_url": "/azure/vpn-gateway/monitor-vpn-gateway",
2710927109
"redirect_document_id": false
2711027110
},
27111+
{
27112+
"source_path_from_root": "/articles/vpn-gateway/point-to-site-vpn-client-configuration-radius.md",
27113+
"redirect_url": "/azure/vpn-gateway/point-to-site-vpn-client-configuration-radius-certificate",
27114+
"redirect_document_id": false
27115+
},
2711127116
{
2711227117
"source_path_from_root": "/articles/vpn-gateway/vpn-gateway-point-to-site-gateway-public-ca.md",
2711327118
"redirect_url": "/azure/vpn-gateway/point-to-site-about",
@@ -38487,7 +38492,7 @@
3848738492
"source_path": "articles/aks/security-hardened-vm-host-image.md",
3848838493
"redirect_url": "/azure/aks/cis-ubuntu",
3848938494
"redirect_document_id": false
38490-
},
38495+
},
3849138496
{
3849238497
"source_path_from_root": "/articles/azure-monitor/platform/alerts-metric-create-templates.md",
3849338498
"redirect_url": "/azure/azure-monitor/alerts/alerts-metric-create-templates",
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
[Azure App Service](../../overview.md) provides a highly scalable, self-patching web hosting service. This quickstart tutorial shows how to deploy a PHP app to Azure App Service on Windows.
2+
3+
You create the web app using the [Azure CLI](/cli/azure/get-started-with-azure-cli) in Cloud Shell, and you use Git to deploy sample PHP code to the web app.
4+
5+
![Sample app running in Azure](../../media/quickstart-php/hello-world-in-browser.png)
6+
7+
You can follow the steps here using a Mac, Windows, or Linux machine. Once the prerequisites are installed, it takes about five minutes to complete the steps.
8+
9+
[!INCLUDE [quickstarts-free-trial-note](../../../../includes/quickstarts-free-trial-note.md)]
10+
11+
## Prerequisites
12+
13+
To complete this quickstart:
14+
15+
* <a href="https://git-scm.com/" target="_blank">Install Git</a>
16+
* <a href="https://php.net/manual/install.php" target="_blank">Install PHP</a>
17+
18+
## Download the sample locally
19+
20+
1. In a terminal window, run the following commands. It will clone the sample application to your local machine, and navigate to the directory containing the sample code.
21+
22+
```bash
23+
git clone https://github.com/Azure-Samples/php-docs-hello-world
24+
cd php-docs-hello-world
25+
```
26+
27+
1. Make sure the default branch is `main`.
28+
29+
```bash
30+
git branch -m main
31+
```
32+
33+
> [!TIP]
34+
> The branch name change isn't required by App Service. However, since many repositories are changing their default branch to `main`, this quickstart also shows you how to deploy a repository from `main`.
35+
36+
## Run the app locally
37+
38+
1. Run the application locally so that you see how it should look when you deploy it to Azure. Open a terminal window and use the `php` command to launch the built-in PHP web server.
39+
40+
```bash
41+
php -S localhost:8080
42+
```
43+
44+
1. Open a web browser, and navigate to the sample app at `http://localhost:8080`.
45+
46+
You see the **Hello World!** message from the sample app displayed in the page.
47+
48+
![Sample app running locally](../../media/quickstart-php/localhost-hello-world-in-browser.png)
49+
50+
1. In your terminal window, press **Ctrl+C** to exit the web server.
51+
52+
[!INCLUDE [cloud-shell-try-it.md](../../../../includes/cloud-shell-try-it.md)]
53+
54+
[!INCLUDE [Configure deployment user](../../../../includes/configure-deployment-user.md)]
55+
56+
[!INCLUDE [Create resource group](../../../../includes/app-service-web-create-resource-group.md)]
57+
58+
[!INCLUDE [Create app service plan](../../../../includes/app-service-web-create-app-service-plan-linux.md)]
59+
60+
## Create a web app
61+
62+
1. In the Cloud Shell, create a web app in the `myAppServicePlan` App Service plan with the [`az webapp create`](/cli/azure/webapp#az_webapp_create) command.
63+
64+
In the following example, replace `<app-name>` with a globally unique app name (valid characters are `a-z`, `0-9`, and `-`). The runtime is set to `PHP|7.4`. To see all supported runtimes, run [`az webapp list-runtimes`](/cli/azure/webapp#az_webapp_list_runtimes).
65+
66+
```azurecli-interactive
67+
az webapp create --resource-group myResourceGroup --plan myAppServicePlan --name <app-name> --runtime 'PHP|7.4' --deployment-local-git
68+
```
69+
70+
When the web app has been created, the Azure CLI shows output similar to the following example:
71+
72+
<pre>
73+
Local git is configured with url of 'https://&lt;username&gt;@&lt;app-name&gt;.scm.azurewebsites.net/&lt;app-name&gt;.git'
74+
{
75+
"availabilityState": "Normal",
76+
"clientAffinityEnabled": true,
77+
"clientCertEnabled": false,
78+
"cloningInfo": null,
79+
"containerSize": 0,
80+
"dailyMemoryTimeQuota": 0,
81+
"defaultHostName": "&lt;app-name&gt;.azurewebsites.net",
82+
"enabled": true,
83+
&lt; JSON data removed for brevity. &gt;
84+
}
85+
</pre>
86+
87+
You've created an empty new web app, with git deployment enabled.
88+
89+
> [!NOTE]
90+
> The URL of the Git remote is shown in the `deploymentLocalGitUrl` property, with the format `https://<username>@<app-name>.scm.azurewebsites.net/<app-name>.git`. Save this URL as you need it later.
91+
>
92+
93+
1. Browse to your newly created web app. Replace _&lt;app-name>_ with your unique app name created in the prior step.
94+
95+
```bash
96+
http://<app-name>.azurewebsites.net
97+
```
98+
99+
Here's what your new web app should look like:
100+
101+
![Empty web app page](../../media/quickstart-php/app-service-web-service-created.png)
102+
103+
[!INCLUDE [Push to Azure](../../../../includes/app-service-web-git-push-to-azure.md)]
104+
105+
<pre>
106+
Counting objects: 2, done.
107+
Delta compression using up to 4 threads.
108+
Compressing objects: 100% (2/2), done.
109+
Writing objects: 100% (2/2), 352 bytes | 0 bytes/s, done.
110+
Total 2 (delta 1), reused 0 (delta 0)
111+
remote: Updating branch 'main'.
112+
remote: Updating submodules.
113+
remote: Preparing deployment for commit id '25f18051e9'.
114+
remote: Generating deployment script.
115+
remote: Running deployment command...
116+
remote: Handling Basic Web Site deployment.
117+
remote: Kudu sync from: '/home/site/repository' to: '/home/site/wwwroot'
118+
remote: Copying file: '.gitignore'
119+
remote: Copying file: 'LICENSE'
120+
remote: Copying file: 'README.md'
121+
remote: Copying file: 'index.php'
122+
remote: Ignoring: .git
123+
remote: Finished successfully.
124+
remote: Running post deployment command(s)...
125+
remote: Deployment successful.
126+
To https://&lt;app-name&gt;.scm.azurewebsites.net/&lt;app-name&gt;.git
127+
cc39b1e..25f1805 main -> main
128+
</pre>
129+
130+
## Browse to the app
131+
132+
Browse to the deployed application using your web browser.
133+
134+
```
135+
http://<app-name>.azurewebsites.net
136+
```
137+
138+
The PHP sample code is running in an Azure App Service web app.
139+
140+
![Sample app running in Azure](../../media/quickstart-php/hello-world-in-browser.png)
141+
142+
**Congratulations!** You've deployed your first PHP app to App Service.
143+
144+
## Update locally and redeploy the code
145+
146+
1. Using a local text editor, open the `index.php` file within the PHP app, and make a small change to the text within the string next to `echo`:
147+
148+
```php
149+
echo "Hello Azure!";
150+
```
151+
152+
1. In the local terminal window, commit your changes in Git, and then push the code changes to Azure.
153+
154+
```bash
155+
git commit -am "updated output"
156+
git push azure main
157+
```
158+
159+
1. Once deployment has completed, return to the browser window that opened during the **Browse to the app** step, and refresh the page.
160+
161+
![Updated sample app running in Azure](../../media/quickstart-php/hello-azure-in-browser.png)
162+
163+
## Manage your new Azure app
164+
165+
1. Go to the <a href="https://portal.azure.com" target="_blank">Azure portal</a> to manage the web app you created. Search for and select **App Services**.
166+
167+
![Search for App Services, Azure portal, create PHP web app](../../media/quickstart-php/navigate-to-app-services-in-the-azure-portal.png)
168+
169+
2. Select the name of your Azure app.
170+
171+
![Portal navigation to Azure app](../../media/quickstart-php/php-docs-hello-world-app-service-list.png)
172+
173+
Your web app's **Overview** page will be displayed. Here, you can perform basic management tasks like **Browse**, **Stop**, **Restart**, and **Delete**.
174+
175+
![App Service page in Azure portal](../../media/quickstart-php/php-docs-hello-world-app-service-detail.png)
176+
177+
The web app menu provides different options for configuring your app.
178+
179+
[!INCLUDE [cli-samples-clean-up](../../../../includes/cli-samples-clean-up.md)]
180+
181+
## Next steps
182+
183+
> [!div class="nextstepaction"]
184+
> [PHP with MySQL](../../tutorial-php-mysql-app.md)
185+
186+
> [!div class="nextstepaction"]
187+
> [Configure PHP app](../../configure-language-php.md)

articles/app-service/quickstart-html.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ adobe-target-content: ./quickstart-html-uiex
1717

1818
[Azure App Service](overview.md) provides a highly scalable, self-patching web hosting service. This quickstart shows how to deploy a basic HTML+CSS site to Azure App Service. You'll complete this quickstart in [Cloud Shell](../cloud-shell/overview.md), but you can also run these commands locally with [Azure CLI](/cli/azure/install-azure-cli).
1919

20+
> [!NOTE]
21+
> For information regarding hosting static HTML files in a serverless environment, please see [Static Web Apps](../static-web-apps/overview.md).
22+
2023
:::image type="content" source="media/quickstart-html/hello-world-in-browser.png" alt-text="Home page of sample app":::
2124

2225
[!INCLUDE [quickstarts-free-trial-note](../../includes/quickstarts-free-trial-note.md)]

0 commit comments

Comments
 (0)