Open additional ports on Azure Web App

后端 未结 6 859
旧时难觅i
旧时难觅i 2020-12-03 19:18

I have recently moved a .NET Web API 2 app from an Azure Cloud Service to an Azure Web App. However, we have a legacy application that needs to communicate with the API on p

6条回答
  •  借酒劲吻你
    2020-12-03 19:29

    In case you consider containerizing and deploying your app:

    By default, App Service assumes your custom container is listening on port 80. If your container listens to a different port, set the WEBSITES_PORT app setting in your App Service app. You can set it via the Cloud Shell. In Bash:

    az webapp config appsettings set --resource-group  --name  --settings WEBSITES_PORT=8000
    

    App Service currently allows your container to expose only one port for HTTP requests.

    Source: https://docs.microsoft.com/en-us/azure/app-service/configure-custom-container?pivots=container-linux#configure-port-number

提交回复
热议问题