Prawin
Prawin

Reputation: 1278

Azure App Service on Linux - Static File Content not updated

I have created an App Service (inside Linux based App Service Plan). I have connected to wwwroot folder using FTP Client

  1. In the hostingstaart.html, I made a simple text change.
  2. I couldn't see the change getting reflected when I navigate to https://.azurewebsites.net/
  3. However, when I navigate to Kudu and access the same page, I can see the change.

Below is the screenshot. In the left hand side (kudu website), I can see the change that I have made (DevOps Engineers). However, In this right hand side, the changes is not shown. In order to troubleshoot, I have added another file as well which is visible in Kudu. But, I'm not able to access the same.

This is not at all an issue in Windows Based App Service Plan. This is an issue only with Linux based app. Is there any docker container internally where it reads the files from? if yes, how do change those files?

Appreciate any help here .

Thanks, Praveen

enter image description here

Upvotes: 0

Views: 1439

Answers (2)

Hari Krishna
Hari Krishna

Reputation: 83

Assuming you are using the app service for SPA, add pm2 serve /home/site/wwwroot --no-daemon --spa to your start up command.

Upvotes: 0

Christian Vorhemus
Christian Vorhemus

Reputation: 2663

Yes, Azure App Service on Linux run in containers and depending on the platform, different webservers and locations are used which can get confusing.

For SSH access into the container go to https://<yourappname>.scm.azurewebsites.net/webssh/host - in .NET projects on Linux the default page you'll see on a new app service is stored at /defaulthome/hostingstart/wwwroot/hostingstart.html while files you upload via FTP will go to /home/site/wwwroot.

That being said, I'd recommend to use the documented ways to publish content based on the platform you want to use. For .NET, you can find the docs here.

Upvotes: 1

Related Questions