StoreFront

为同一 Citrix Gateway 配置两个 URL

在 StoreFront 中,可以从 StoreFront 管理控制台的管理 Citrix Gateway > 添加编辑来添加单个 Citrix Gateway URL。也可以在管理 Citrix Gateway > 从文件中导入中添加公用 Citrix Gateway URL 和 GSLB(全局服务器负载平衡)URL。

本文介绍了如何使用 PowerShell cmdlet 和 StoreFront PowerShell SDK 来使用可选参数 -gslburl 以设置网关的 GslbLocation 属性。在以下用例中,此功能简化了在 StoreFront 中进行的 Citrix Gateway 管理:

  1. GSLB 和多个 Citrix Gateway。可使用 GSLB 和多个 Citrix Gateway 对与大型全球 Citrix 部署中两个或更多位置的已发布资源的远程连接进行负载平衡。
  2. 使用公用 URL 或专用 URL 的单个 Citrix Gateway。可使用同一 Citrix Gateway 在外部使用公用 URL 进行访问以及在内部使用专用 URL 进行访问。

这是一项高级功能和主题。如果您是初次了解 StoreFront 网关和全局服务器负载平衡 (GSLB) 概念,请参阅本文结尾处的相关信息链接。

此功能具有以下优点:

  • 支持单个网关对象有两个同时使用的 URL。
  • 用户可以在两个不同的 URL 之间切换来访问 Citrix Gateway,无需管理员重新配置 StoreFront 网关对象来匹配用户要使用的网关 URL。
  • 使用多个 GSLB 网关时用于验证 StoreFront 网关配置的设置和测试时间缩短。
  • 在 DMZ 内部的 StoreFront 中使用相同的 Citrix Gateway 对象进行外部和内部访问。
  • 支持两个 URL 进行最佳网关路由。有关最佳网关路由的详细信息,请参阅设置高可用性多站点应用商店

使用两个网关 URL 时的部署注意事项

  • StoreFront 管理控制台中显示每个网关的 gatewayURL FQDN。每个网关的 GSLBURL 属性仅通过使用 PowerShell cmdlet 可见。
  • 本机 Citrix Receiver 和 Citrix Workspace 应用程序使用 gatewayURL 进行身份验证。
  • gatewayURL 包含在用于使用应用商店和网关信息配置 Citrix Receiver 和 Citrix Workspace 应用程序的预配文件 (receiver.cr) 中的位置标记中。
  • 使用提供的 Powershell 修改应用商店和漫游 web.config 文件。请勿手动执行此操作。

重要:

使用 -gslburl 参数配置第二个网关 URL 之前,请检查有哪些服务器证书以及贵组织如何执行 DNS 解析。要在您的 Citrix Gateway 和 StoreFront 部署中使用的任何 URL 都必须存在于您的服务器证书中。有关服务器证书的详细信息,请参阅计划网关和服务器证书的使用

DNS

  • 拆分 DNS。大型企业使用拆分 DNS 很常见。拆分 DNS 涉及使用不同的命名空间和不同的 DNS 服务器进行公用和专用 DNS 解析。请检查您的现有 DNS 基础结构是否支持这一点。
  • 用于对已发布的资源进行外部和内部访问的单个 URL。决定是否要使用相同的 URL 从企业网络外部和内部访问已发布的资源,或考虑是否接受两个不同的 URL,例如 example.comexample.net

服务器证书示例

本节包含使用两个网关 URL 时的示例服务器证书部署。

负载平衡的 StoreFront 部署的示例服务器证书

专门签名的通配符服务器证书应包含 FQDN *.storefront.example.net。

专门签名的 SAN 服务器证书应包含对三个 StoreFront 服务器进行负载平衡所需的所有 FQDN。

loadbalancer.storefront.example.net
server1.storefront.example.net
server2.storefront.example.net
server3.storefront.example.net
<!--NeedCopy-->

设置 StoreFront 服务器组的主机基本 URL,该 URL 要成为共享的 FQDN,它解析为负载平衡器 IP 地址:

loadbalancer.storefront.example.net
<!--NeedCopy-->

使用拆分 DNS 在外部和内部访问的 Citrix Gateway 的服务器证书示例

用于外部和内部访问的公开签名的 SAN 服务器证书应包含外部和内部 FQDN。

gateway.example.com
gateway.example.net
<!--NeedCopy-->

在外部访问的所有 GSLB 网关的服务器证书示例

用于通过 GSLB 进行外部访问的公开签名的 SAN 服务器证书应包含 FQDN。

gslbdomain.example.com
emeagateway.example.com
usgateway.example.com
apacgateway.example.com
<!--NeedCopy-->

这允许用户使用 GSLB 访问最近的网关,或使用网关的唯一 FQDN 在其所选项的位置中选取网关。

用例 #1:Receiver for Web:GSLB 和多个 Citrix Gateway

管理员可使用 GSLB 和多个 Citrix Gateway 对与大型全球 Citrix 部署中两个或更多位置的已发布资源的远程连接进行负载平衡。

GSLB 和多个 Citrix Gateway

在此示例中:

  • 每个位置或数据中心至少包含一个网关、一个或多个 StoreFront 服务器、一个或多个 XenApp 和 XenDesktop 控制器,才能在该位置提供已发布的资源。全球部署中的 GSLB Citrix ADC 设备上配置每个 GSLB 服务都表示一个网关 VPN 虚拟服务器。部署中的所有 StoreFront 服务器都必须配置为包含组成 GSLB 层的所有 Citrix Gateway 虚拟服务器。GSLB Citrix Gateway 在主动/主动模式下使用,但如果一个位置的网络连接、DNS、网关、StoreFront 服务器或 Citrix Virtual Apps and Desktops 控制器出现故障,这些网关还可以提供故障转移。如果 GSLB 服务不可用,用户会被自动定向到另一个网关。
  • 进行远程连接时,根据配置的 GSLB 负载平衡算法(如往返时间 (RTT) 或静态临近度),外部客户端会被定向到最近的网关。
  • 每个网关的唯一 URL 允许用户通过选择要使用的网关的位置特定的 URL 来手动选择要从其启动资源的数据中心。
  • GSLB 或 DNS 委派未按预期发挥作用时,可以绕过 GSLB。用户可以使用数据中心的位置特定的 URL 继续访问任何数据中心的远程资源,直到所有 GSLB 相关问题得到解决。

用例 #1:Receiver for Web 和 Citrix Receiver 或 Citrix Workspace 应用程序:GSLB 和多个 Citrix Gateway

网关属性

要将 GSLB 与本机 Citrix Receiver 或 Citrix Workspace 应用程序结合使用,请使用 Add-STFRoamingGateway(创建)或 Set-STFRoamingGateway(修改)指定以下属性:

-GatewayUrl — 设置为所有 GSLB 网关的共享 FQDN

-GSLBurl — 设置为每个网关的唯一网关 FQDN

注意:

这可能看似违背常理,但对此 Web 用例没有影响。它确保本机 Citrix Receiver 或 Citrix Workspace 应用程序通过访问终端节点 https://storefront.domain.com/citrix/<storename>/discovery 在发现文档中接收 GSLB 使用的共享 FQDN。它还确保由 StoreFront 的导出预配文件命令导出的预配文件 (receiver.cr ) 包含共享 GSLB FQDN。

示例预配文件

使用 -GatewayUrl https://gslb.domain.com 的示例文件 1。这允许本机 Citrix Receiver 或 Citrix Workspace 应用程序使用 GSLB 连接到网关。

允许本机 Citrix Receiver 或 Citrix Workspace 应用程序使用 GSLB 连接到网关

使用 -GatewayUrl https://emeagateway.domain.com, https://usgateway.domain.com and https://apacgateway.domain.com 的示例文件 2。这允许本机 Citrix Receiver 或 Citrix Workspace 应用程序使用唯一的 URL 连接到网关。

允许本机 Citrix Receiver 或 Citrix Workspace 应用程序使用唯一的 URL 连接到网关

共享 FQDN 由本机 Citrix Receiver 和 Citrix Workspace 应用程序用来进行身份验证。

用例 #2:使用公用 URL 或专用 URL 的单个 Citrix Gateway

管理员可使用同一 Citrix Gateway 在外部使用公用 URL 进行访问以及在内部使用专用 URL 进行访问。

使用公用 URL 或专用 URL 的单个 Citrix Gateway

在此示例中:

  • 管理员希望对已发布资源和 HDX 启动通信的所有访问都通过 Citrix Gateway,即使客户端是内部的也是如此。
  • Citrix Gateway 位于 DMZ 中。
  • 有两种不同的网络路由通过 DMZ 任一端的两个防火墙到达 Citrix Gateway。
  • 面向公众的外部命名空间不同于内部命名空间。

PowerShell cmdlet 示例

可使用 PowerShell cmdlet Add-STFRoamingGatewaySet-STFRoamingGateway 并带参数 -gslburl 对 StoreFront 网关对象设置 GslbLocation 属性。例如:

Add-STFRoamingGateway -Name "EMEAGateway" -GatewayUrl "https://emeagateway.example.com" -GSLBurl "https://gslb.example.com" -SubnetIPAddress "10.0.0.1" -CallbackUrl "https://emeagateway.example.com" -LogonType "DomainAndRSA" -SmartCardFallbackLogonType "None" -Version "Version10_0_69_4" -SecureTicketAuthorityUrls "https://emea-controller.example.com/scripts/ctxsta.dll,https://us-controller.example.com/scripts/ctxsta.dll,https://apac-controller.example.com/scripts/ctxsta.dll"
Set-STFRoamingGateway -Name "EMEAGateway" -GatewayUrl "https://emeagateway.example.com" -GSLBurl "https://gslb.example.com"
Get-STFRoamingGateway -Name "EMEAGateway" (returns just the EMEA gateway object)
Or
Get-STFRoamingGateway (returns all gateway object configured in StoreFront)
<!--NeedCopy-->

对于用例 #1,可以通过将 GslbLocation 设置为 NULL 从 EMEAGateway 中删除 GSLBurl。以下 PowerShell 将修改内存中存储的网关对象 $EMEAGateway。Set-STFRoamingGateway 之后可以通过 $EMEAGateway 传输以更新 StoreFront 配置并删除 GSLBurl。

$EMEAGateway = Get-STFRoamingGateway
$EMEAGateway.GslbLocation = $Null
Set-STFRoamingGateway -Gateway $EMEAGateway
<!--NeedCopy-->

对于用例 #1,使用 Get-STFRoamingGateway 返回以下网关:

Name: EMEAGateway
Location: https://emeagateway.example.com/ (Unique URL for the EMEA Gateway)
GslbLocation: https://gslb.example.com/ (GSLB URL for all three gateways)

Name: USGateway
Location: https://USgateway.example.com/ (Unique URL for the US Gateway)
GslbLocation: https://gslb.example.com/ (GSLB URL for all three gateways)

Name: APACGateway
Location: https://APACgateway.example.com/ (Unique URL for the APAC Gateway)
GslbLocation:  https://gslb.example.com/ (GSLB URL for all three gateways)
<!--NeedCopy-->

对于用例 #2,使用 Get-STFRoamingGateway 返回以下网关:

Name: EMEAGateway
Location: https://emeagateway.example.com/ (Public URL for the Gateway)
GslbLocation: https://emeagateway.example.net/ (Private URL for the Gateway)
<!--NeedCopy-->

对于用例 #1,使用 Get-STFStoreRegisteredOptimalLaunchGateway 返回最佳网关路由:

$StoreObject = Get-STFStoreService -SiteId 1 -VirtualPath "/Citrix/<YourStore>"

Get-STFStoreRegisteredOptimalLaunchGateway -StoreService $StoreObject

Hostnames:       {emeagateway.example.com, gslb.example.com}
Hostnames:       {usgateway.example.com, gslb.example.com}
Hostnames:       {apacgateway.example.com, gslb.example.com}
<!--NeedCopy-->

每个网关的 GSLB URL 或内部 URL 都存储在漫游服务 web.config 文件中

StoreFront 不在 StoreFront 管理控制台中显示每个网关的 GSLB URL 和 URL,但可以通过打开 StoreFront 服务器上 C:\inetpub\wwwroot\Citrix\Roaming\web.config 中的漫游服务 Web.Config 文件位置来查看所有 GSLB 网关的已配置 GSLBLocation 路径。

用例 #1:漫游 web.config 文件中的网关

<gateway id="cca13269-18c1-10fd-a0df-7931b3897aa8" name="EMEAGateway" default="false" edition="Enterprise" version="Version10_0_69_1" auth="DomainAndRSA" smartcardfallback="None" ipaddress="10.0.0.1" rwmode="NONE" deployment="Appliance" callbackurl=https://emeagateway.example.com/CitrixAuthService/AuthService.asmx sessionreliability="true" requesttickettwosta="false" stasUseLoadBalancing="false" stasBypassDuration="01:00:00">
<location path="https://emeagateway.example.com/" /><gslbLocation path="https://gslb.example.com/" /><clusternodes>
<clear />
</clusternodes>
<silentauthenticationurls>
<clear />
</silentauthenticationurls>
<secureticketauthorityurls>
<clear />
<location path="https://emea-controller.example.com/scripts/ctxsta.dll" />
<location path="https://us-controller.example.com/scripts/ctxsta.dll" />
<location path="https://apac-controller.example.com/scripts/ctxsta.dll" />
</secureticketauthorityurls>
</gateway>

<gateway id="b8ec720c-d85e-1889-8188-1cf08a2cf762" name="USGateway" default="false" edition="Enterprise" version="Version10_0_69_1" auth="DomainAndRSA" smartcardfallback="None" ipaddress="10.0.0.2" rwmode="NONE" deployment="Appliance" callbackurl="https://usgateway.example.com/CitrixAuthService/AuthService.asmx" sessionreliability="true" requesttickettwosta="false" stasUseLoadBalancing="false" stasBypassDuration="01:00:00"><location path="https://usgateway.example.com/" /><gslbLocation path="https://gslb.example.com/" /><clusternodes>
<clear />
</clusternodes>
<silentauthenticationurls>
<clear />
</silentauthenticationurls>
<secureticketauthorityurls>
<clear />
<location path="https://emea-controller.example.com/scripts/ctxsta.dll" />
<location path="https://us-controller.example.com/scripts/ctxsta.dll" />
<location path="https://apac-controller.example.com/scripts/ctxsta.dll" />
</secureticketauthorityurls>
</gateway>

<gateway id="c57117b5-e111-1eed-9117-a1ffa1c8100e" name="APACGateway" default="false" edition="Enterprise" version="Version10_0_69_1" auth="DomainAndRSA" smartcardfallback="None" ipaddress="10.0.0.3" rwmode="NONE" deployment="Appliance" callbackurl="https://apacgateway.example.com/CitrixAuthService/AuthService.asmx" sessionreliability="true" requesttickettwosta="false" stasUseLoadBalancing="false" stasBypassDuration="01:00:00"><location path="https://apacGateway.example.com/" /><gslbLocation path="https://gslb.example.com/" /><clusternodes>
<clear />
</clusternodes>
<silentauthenticationurls>
<clear />
</silentauthenticationurls>
<secureticketauthorityurls>
<clear />
<location path="https://emea-controller.example.com/scripts/ctxsta.dll" />
<location path="https://us-controller.example.com/scripts/ctxsta.dll" />
<location path="https://apac-controller.example.com/scripts/ctxsta.dll" />
</secureticketauthorityurls>
</gateway>
<!--NeedCopy-->

用例 #2:漫游 web.config 文件中的网关

<gateway id="cca13269-18c1-10fd-a0df-7931b3897aa8" name="EMEAGateway" default="false" edition="Enterprise" version="Version10_0_69_1" auth="Domain" smartcardfallback="None" ipaddress="10.0.0.1" rwmode="NONE" deployment="Appliance" callbackurl="https://emeagateway.example.com/CitrixAuthService/AuthService.asmx" sessionreliability="true" requesttickettwosta="false" stasUseLoadBalancing="false" stasBypassDuration="01:00:00">
<location path="https://emeagateway.example.com/" />
<gslbLocation path=" https://emeagateway.example.net/" />
<clusternodes>
<clear />
</clusternodes>
<silentauthenticationurls>
<clear />
</silentauthenticationurls>
<secureticketauthorityurls>
<clear />
<location path="https://emea-controller.example.net/scripts/ctxsta.dll" />
</secureticketauthorityurls>
</gateway>
<!--NeedCopy-->

相关信息

在开发人员文档中,请参阅 Citrix StoreFront SDK PowerShell 模块