0

the first page with the root "/" is working but any other root give error 404 (the project is working perfectly on local)

[enter image description here](https://i.stack.imgur[enter image description here](https://i.stack.imgur.com/Kg08Q.png).com/kmJ0J.png) these are the inginx configarution and the screens for the problem

AjayKumar
  • 2,812
  • 1
  • 9
  • 28

1 Answers1

0

I see that your WebApp is now stopped. Your WebApp

Based on the application framework you're using, customize Nginx configuration and add rewrite rules. Ensure that your app's routing is configured correctly

Create a custom script named /home/site/startup.sh that overrides the existing /etc/nginx/sites-available/default file with the updated version located in /home/site/default.

On Azure Portal > Navigate to your WebApp: Go to Configuration --> General settings and add the “Startup Command”

(similar to as mentioned in the article) Configure Nginx for PHP 8 Linux Azure App Service

Use custom startup script to overwrite original Nginx config file. This way, the platform can use your configuration to start the Nginx server every time the App Service being started.

Reference:

Azure App Service | How to set Nginx headers

NGINX Rewrite Rules for Azure App Service Linux

AjayKumar
  • 2,812
  • 1
  • 9
  • 28