Nextjs Routes are not working when deployed to Azure App Service Linux Instance

Yigit C Alparslan 21 Reputation points
2022-05-13T21:17:19.313+00:00

I wanted to deploy a nextjs app to Azure App Service with Linux instance.

I followed the instructions here: https://developinjay.com/deploying-nextjs-app-to-azure-app-service-linux-77a43353e761
The app is live here https://interviewramp.azurewebsites.net and https://interviewramp.herokuapp.com.
Routes work in Heroku. So if user goes here https://interviewramp.herokuapp.com/books/interviewramp/introduction it works.
Routes don't work in Azure App service. So, if user goes here https://interviewramp.azurewebsites.net/books/interviewramp/introduction, I get 404 document not found error, which means code is trying to serve an introduction.html file in Azure and returning 404 because there is no html file like that.

All links work locally when I npm run start or npm run dev.
Pasting url like this to browser gives 404 : https://interviewramp.azurewebsites.net/login

I have never done next export in my code. I was wondering if you could help me?

Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
207 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,900 questions
0 comments No comments
{count} votes

Accepted answer
  1. Grmacjon-MSFT 16,011 Reputation points
    2022-05-17T00:30:17.483+00:00

    Hi @Yigit C Alparslan ,

    Thanks for bringing this to our attention. I am not seeing the 404 error. I am able to see your site. This is what I see
    202443-interviewrampsite.png


0 additional answers

Sort by: Most helpful