【问题标题】:NextJS and Azure - "You do not have permission to view this directory or page."NextJS 和 Azure - “您无权查看此目录或页面。”
【发布时间】:2021-01-29 07:05:47
【问题描述】:

我已经尝试了多个演练和 YouTube 视频,但我仍然缺少一些东西。我正在使用 Azure DevOps 来构建和 Azure App Service 来部署。这些步骤至少可以部署我的代码,我可以从 Kudu DebugConsole 看到 /site/wwwroot 中的所有内容。

我尝试创建一个server.js 文件来正确设置端口: https://github.com/willemliu/fd-design-system-test/blob/master/server.js

我在根目录中包含了一个 web.config 来指向这个 server.js 文件: https://github.com/MRCollective/nextjs-server-azuresiteextension/blob/master/Next.js/files/web.config

但无论我尝试什么,我都会看到此权限错误。有人有什么建议吗?

解决方案!

问题出在我的web.config 上。我把它换成了这个,现在一切正常。 https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config

【问题讨论】:

    标签: azure next.js


    【解决方案1】:

    大多数情况下,由于不正确的虚拟路径 -> 物理路径映射,您可能会遇到此问题。请检查虚拟路径映射是否正确。

    https://docs.microsoft.com/en-us/azure/app-service/configure-common

    这里回答了类似的问题。请看一下,希望它有所帮助。 Azure website message "You do not have permission to view this directory or page.". What to do?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-02
      • 2021-01-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多