0

directory structureI have sucessfully deployed nodejs app in azure. when I navigate to **https://my-app/xyz ** refresh page I see, You do not have permission to view this directory or page.

I tried to edit web-config but still it doesn't work. I am not sure If this is security issue or node.js is not able to serve anything for this route but on my local machine If I do refresh It doesn't show this issue. Thje picture above contains the directory structure and /client has Angular compiled files.Thank you

<system.webServer>
  <rewrite>
    <rules>
      <rule name="RewriteRules" stopProcessing="true">
        <match url=".*" />
        <conditions logicalGrouping="MatchAll">
          <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
          <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
          <add input="{REQUEST_URI}" pattern="^/(api)" negate="true" />
        </conditions>
        <action type="Rewrite" url="/index.html" />
      </rule>
    </rules>
  </rewrite>
</system.webServer>
karansys
  • 2,449
  • 7
  • 40
  • 78

1 Answers1

0

I have experienced this error. I suppose you access the website via a virtual directory.

  • Make sure you have set the correct virtual directory for your app. It should be the virtual path /xyz, Physical Path site\wwwroot\yourcustomfoldername. It will be something like this, enter image description here
  • Make sure the Physical Path match the actual root directory of your web app in KUDU site. enter image description here
Nancy
  • 26,865
  • 3
  • 18
  • 34