2015-02-11 82 views

回答

3

是的,外部端點可以添加到Azure網站和Azure雲服務之外的Azure流量管理器配置文件。您將需要使用Azure PowerShell模塊來設置自定義端點。

  1. 安裝Azure的PowerShell的模塊:https://github.com/azure/azure-powershell/releases
  2. 運行下面的腳本(用自己的帳戶名代替$Username變量)

https://azure.microsoft.com/en-us/documentation/articles/traffic-manager-overview/

### Authenticate to Azure from PowerShell 
$Username = '[email protected]'; 
$AzureCredential = Get-Credential -Credential $Username; 
Add-AzureAccount -Credential $AzureCredential; 

### Select the appropriate Azure subscription, if you have multiple 
Select-AzureSubscription -SubscriptionName 'Visual Studio Ultimate with MSDN'; 

### Retrieve the Traffic Manager profile (if already created) 
$TrafficManagerProfile = Get-AzureTrafficManagerProfile -Name trevor; 

### Add custom endpoints to the Traffic Manager Profile 
Add-AzureTrafficManagerEndpoint -TrafficManagerProfile $TrafficManagerProfile -DomainName www.microsoft.com -Type Any -Status Enabled; 
Add-AzureTrafficManagerEndpoint -TrafficManagerProfile $TrafficManagerProfile -DomainName trevorsullivan.net -Type Any -Status Enabled; 

### Commit the changes to your Azure Traffic Manager Profile 
Set-AzureTrafficManagerProfile -TrafficManagerProfile $TrafficManagerProfile; 

它不是做得比較匹配上面的代碼,但這裏是我的Traffic Manger配置文件名爲「Trevor」的外觀以及兩個端點的截圖。

Traffic Manager Profile

+0

是否有可能讓mysite.com/get和mysite.com/set轉到不同的域? – ryan 2015-02-11 18:42:36