I am new to Azure. I am trying simple Azure cloud deployments. I have this basic demo Angular app which is perfectly working in local environment. I did all the Azure setup & its successfully deploying. But when i browse the website its giving server error. Any inputs please. Thanks
Asked
Active
Viewed 699 times
2 Answers
0
You need to add a web.config which tell Azure that you are using a Node application and you need to start it.
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Angular" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

Sajeetharan
- 216,225
- 63
- 350
- 396
-
Hi @Sajeetharan , Thanks for your input. Yes i added web.config file under src & the rebuild it. I can see web.config in dist folder too but still unable to get rid of that error. – user1967685 May 18 '21 at 13:33
0
If you are deploying your code in the App service, please check its Default documents.
It's available in the Appservice's Settings -> Configuration -> Default documents.
If index.html is not listed in the document list, please add it.
Screenshot for reference:

Arulkumar
- 12,966
- 14
- 47
- 68