Azure 应用服务 - 如何配置端口?

标签 azure azure-web-app-service

当我使用 Maven 将示例 Spring Boot 应用程序部署到 Azure 应用服务时(就像 documentation 中一样),无论 application.properties 中的 server.port 值如何,它都能正常工作。 em> 文件。应用服务只是“知道”目标端口是什么。

当我部署其他不基于 Spring Boot 而是基于 Tomcat Embedded 且在其源代码中硬编码端口值的应用程序时,应用程序服务无法正常工作。如何“告诉”应用服务我的应用监听的端口是什么?

最佳答案

应用服务始终监听端口 80/443。您可以将 WEBSITES_PORT 应用程序设置映射到您的应用程序监听的端口号。

关于Azure 应用服务 - 如何配置端口?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75316151/

相关文章:

c# - 查询参数中包含 %2B 的 ASP.net core 3.0 GET 方法在 Azure 上不起作用

asp.net-mvc-4 - 如何在 VS2013 中使用角色设置新的 Azure MVC 项目?

asp.net - Azure WebApp 上用于 AppInitialization 的 IP 白名单

Java 小程序无法在 Azure 中运行

c# - 在没有 Redis 的 Azure 上运行的 ASP.NET Core 应用程序中缓存数据

azure - 当证书资源托管在 Key Vault 中时,如何在 ARM 模板中定义证书资源?

azure - 应用程序未经租户管理员安装或未经租户中任何用户同意。授权错误

azure - 从 Visual Studio 发布到 Azure 虚拟机

azure - 如何访问 Azure Web Apps For Containers 的持久共享存储

c# - 在 Azure 应用服务的 ASP.Net Core 应用程序中获取 System.BadImageFormatException 和 System.InvalidProgramException