question

AshishPandurangKarpeRingZeroGameSt-6595 avatar image
0 Votes"
AshishPandurangKarpeRingZeroGameSt-6595 asked SnehaAgrawal-MSFT answered

deployed a PHP app in the Azure web app service having issue

Hi All,
I have deployed a PHP app in the Azure web app service. The app is on git repo which I have configured in Deployment Center. But when I open the link URL for my app https://xyz-poc-dev.azurewebsites.net/ it still shows the below message:


Hey, App Service developers!

Your app service is up and running.
Time to take the next step and deploy your code.


Note: I even tried deploying my App on the LAMP stack on a VM it's working so please let me know what's missing.

azure-webappsazure-webapps-content-deployment
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SnehaAgrawal-MSFT avatar image
1 Vote"
SnehaAgrawal-MSFT answered

Thanks for asking question! Could you please confirm if you have you pushed to Azure from Git?

  1. From your local terminal window, add an Azure remote to your local Git repository by using below command: git remote add azure <deploymentLocalGitUrl-from-create-step> Replace <deploymentLocalGitUrl-from-create-step> with the URL of the Git remote.

  2. Then push to the Azure remote to deploy your app with the following command: git push azure master

  3. When Git Credential Manager prompts you for credentials, make sure you enter the credentials you created in Configure a deployment user, not the credentials you use to sign in to the Azure portal.

Check this document link: https://docs.microsoft.com/en-gb/azure/app-service/deploy-local-git?toc=%2Fazure%2Fapp-service%2Ftoc.json&tabs=portal#deploy-the-web-app

Further you could review the Startup script and configuration for the PHP frame as mentioned in below documents.
Configure a Windows PHP app for Azure App Service
Configure a Linux PHP app for Azure App Service

Please note that by default, Azure App Service points the root virtual application path (/) to the root directory of the deployed application files (sites\wwwroot).
On Linux, the container runs Apache, you can rewrite the URL to public/index.php with a single .htaccess file in our root directory.

Also, ensure that the Rewrite rules are appropriate to map URLs to public/index.php file.

The default PHP image for App Service uses Apache, and it doesn't let you customize the site root for your app. To work around this limitation, add an .htaccess file to your repository root.

Additionally Azure provides built-in diagnostics to assist with debugging an App Service app.
Check this article, you learn how to enable diagnostic logging and add instrumentation to your application, as well as how to access the information logged by Azure.

Let us know if there is further query or issue remains.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.