1/2
By default, Azure App Service points the root virtual application path / to the root directory of the deployed application files (D:\home\site\wwwroot).
You could provide an optional startup
command that will be run as part of container startup.
In Azure portal: select the app's Configuration page
, then select General settings
.
In the Startup Command
field (add name of your startup command file) and then Save
.
Example-Laravel, uses the public/ subdirectory
as the site root. To customize the site root, you need to set the virtual application path for the app.
The default PHP image for App Service uses Apache, and it doesn't let you customize the site root for your app.
You can add an .htaccess
file to your repository root with the following content, shared in this document section -"Change site root"