After deploying a simple Web App in php , still page loading with hostingstart.html file

Hari Narayanan 41 Reputation points
2021-05-18T06:10:43.223+00:00

Hi All,

I created a basic PHP file and tried deploying through both FTP and git , where in both scenarios the URL taking to Hostingstart.html. I tried giving https://<site-name>.azurewebsites.net/index.php , it takes to 404 Not Found.

Can anyone assist me on this ?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
0 comments No comments
{count} votes

Accepted answer
  1. ajkuma 28,036 Reputation points Microsoft Employee Moderator
    2021-05-18T11:52:12.747+00:00

    @Hari Narayanan ,

    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"


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.