我如何在 azure 中重新启动应用程序网关

Roo*_*Raj -3 azure azure-web-app-service

我的安装的当前结构

我的安装的当前结构

我必须在 azure 中重新启动应用程序网关

小智 10

或者使用 AZ CLI(这解决了后端池的弹跳问题)

az network application-gateway stop --id /subscriptions/<sub-id>/resourceGroups/<resource-group>/providers/Microsoft.Network/applicationGateways/<waf-name>

az network application-gateway start --id /subscriptions/<sub-id>/resourceGroups/<resource-group>/providers/Microsoft.Network/applicationGateways/<waf-name>
Run Code Online (Sandbox Code Playgroud)


4c7*_*b41 8

Get-AzureRmApplicationGateway | Stop-AzureRmApplicationGateway | Start-AzureRmApplicationGateway
Run Code Online (Sandbox Code Playgroud)

或者您可以跳过获取并只指定开始\停止的内容。以上将重新启动子中的所有网关。所以如果这不是你的目标,你应该更具体。

附:为什么要重启?

  • 如果在 ILB ASE 使用的 vnet 中修改 DNS,则需要重新启动 appgw。如果没有,它将无法解析 webapp 的 fqdn。这将是重新启动它的原因 (2认同)

小智 5

打开安装了 Az 模块的 Azure Cloud Shell 或本地 PowerShell 并使用以下命令:

# Get Azure Application Gateway
$appgw=Get-AzApplicationGateway -Name <appgw_name> -ResourceGroupName <rg_name>

# Stop the Azure Application Gateway
Stop-AzApplicationGateway -ApplicationGateway $appgw

# Start the Azure Application Gateway (optional)
Start-AzApplicationGateway -ApplicationGateway $appgw
Run Code Online (Sandbox Code Playgroud)