0

Azure web app Easy auth (with Azure AD auth) is working for windows web apps, but not on Linux web app. After enabling the easy auth with Azure AD the web app url shows page not found.

enter image description here

When I checked the web app logs, the container has started and ready to serve the requests. But the web app still shows same Not Found error. If I disable the easy-auth the web app is working as is.

My azure web app tech stack is React SPA running on Node LTS 14 in a Linux web app.

Not sure if I am missing something on configuration. Any help is appreciated. Thanks in advance...

Ravikumar B
  • 779
  • 1
  • 14
  • 25
  • If the container is failing to start, check the logs to find out why. – mason Jan 12 '22 at 03:49
  • If possible could you please try and let me know if the easy-auth is working for Linux web-apps. My application in a React JS UI on node run time – Ravikumar B Jan 12 '22 at 04:21
  • Can this help you? https://learn.microsoft.com/en-us/azure/app-service/overview-authentication-authorization#feature-architecture-on-linux-and-containers – Tiny Wang Jan 12 '22 at 09:56
  • I have been through this.. but it did n't help. Thanks for advice. – Ravikumar B Jan 12 '22 at 15:11

1 Answers1

0

Please check if below cases :

Note :

  1. Limitation : App Service on Linux is not supported on Shared pricing tier.
  2. Linux Azure Web Apps uses pm2 to serve a node app

Go to Azure app service> Configuration > General Settings. If your build folder is at the root of the project,give Start up command: pm2 serve /home/site/wwwroot --no-daemon –spa

Please go through these related issue References to trouble shoot :

  1. reactjs - Web App Linux - Stack Overflow
  2. React App not starting in azure app service - Stack Overflow

Also please check this Blog.


According to Azure App Service | Microsoft Docs

This error could be due to one of several reasons:

  1. The custom domain configured is missing an A record or a CNAME record.

  2. The web app owner has moved the web app to a different region, but the DNS cache is still directing to the old IP Address that was used in the previous region.

  • Clear the browser cache and cookies for the site and test for DNS resolution/ dns entries if they are still pointing to an old IP.Edit and correct dns in that case.

In your app page, select TLS/SSL settings. Then make HTTPS Only to On.

enter image description here

Also, suggest you Enable diagnostics logging for web apps in Azure App Service incase if you haven’t enabled earlier to check the complete error details and root cause.

kavyaS
  • 8,026
  • 1
  • 7
  • 19
  • I have enabled the diagnostic logging, hence I could see that the web app container is started and ready to serve the requests, the web app has `Https` enabled. Also my pricing tier is `S1` (which is not shared infrastructure). I was already using the specified `pm2` command to start the web app. It is working with out easy-auth. The problem starts when I enable easy-auth. – Ravikumar B Jan 12 '22 at 15:22