为部署在 Azure 上的 java 网站获取 403

Getting 403 for a java website deployed on Azure

我正在尝试通过 git 将一个简单的 java Web 应用程序部署到 MS Azure。当它部署并且我尝试浏览它时,该网站出现 403 错误,显示 "you don't have permission to view this page".

但是,如果我将我的 index.jsp 页面转换为 index.html 页面(并删除 java 特定代码,当然)。网站运行完美

有没有人对此有任何见解。

我可以知道您在尝试浏览您的网站时使用了哪个 URL 吗?如果你没有把 index.jsp 放在 URL 中,请尝试使用完整的 URL 看看它是否有效,例如YourName.azurewebsites.net/index.jsp。根据我的经验,index.html 在默认页面列表中,但 index.jsp 不在。因此,如果您可以使用 index.jsp 打开完整的 URL,那么您只需使用 Web 应用程序设置页面上的默认文档功能配置默认页面:YourWebApp CONFIGURE 选项卡 -> 默认文档部分:

可以在 https://azure.microsoft.com/en-us/documentation/articles/web-sites-configure/. If that still doesn't work, then please refer to https://azure.microsoft.com/en-us/documentation/articles/web-sites-java-custom-upload/ 找到更多信息,看看是否有帮助。