Hi everyone, I’m facing an issue after deploying my web app to Azure App Service.
Problem:
I deployed a React (Vite) web app to Azure App Service using GitHub Actions. The deployment completes successfully, but when I open the site I immediately get a 404 Not Found page from Azure.
Sometimes the site loads for a moment and then switches back to 404.
Environment:
Framework: React (Vite)
Hosting: Azure App Service (Linux)
Deployment: GitHub Actions
Build command: npm install + npm run build
What I’ve verified so far:
GitHub build logs show success
site/wwwroot contains build output
Startup command not configured (default)
App Service logs don’t show fatal errors
Questions:
Why would Azure return 404 after a successful deployment?
Do I need a custom startup command for Vite apps on App Service?
Where should the built files be located for static serving?
Is there additional configuration needed (web.config, nginx, startup script, etc.)?
It seems the 404 might be coming from Azure’s default landing page or missing static server routing configuration.
I also read that Vite builds may need:
-
/build output moved to /wwwroot
web.config for SPA routing (if Windows)
staticwebapp.config.json (if Azure Static Web App)
Hi everyone, I’m facing an issue after deploying my web app to Azure App Service.
Problem:
I deployed a React (Vite) web app to Azure App Service using GitHub Actions. The deployment completes successfully, but when I open the site I immediately get a 404 Not Found page from Azure.
Sometimes the site loads for a moment and then switches back to 404.
Environment:
Framework: React (Vite)
Hosting: Azure App Service (Linux)
Deployment: GitHub Actions
Build command: npm install + npm run build
What I’ve verified so far:
GitHub build logs show success
site/wwwroot contains build output
Startup command not configured (default)
App Service logs don’t show fatal errors
Questions:
Why would Azure return 404 after a successful deployment?
Do I need a custom startup command for Vite apps on App Service?
Where should the built files be located for static serving?
Is there additional configuration needed (web.config, nginx, startup script, etc.)?
It seems the 404 might be coming from Azure’s default landing page or missing static server routing configuration.
I also read that Vite builds may need:
/build output moved to /wwwroot
web.config for SPA routing (if Windows)
-
staticwebapp.config.json (if Azure Static Web App)