---
schema_version: "1"
id: 791e9391617588aed4cbe8fec875f84c98df83c1594e88eeac3417909b19ec58
title: gatewaySettings 实体
collection: tableau
version: current
locale: zh-cn
portal_url: https://docs.salesforce.com/tableau/current/zh-cn/server-linux/entity_gateway.md
canonical_url: https://help.tableau.com/current/server-linux/zh-cn/entity_gateway.htm
source_site: help.tableau.com
content_type: documentation
content_hash: f837a8088691afe3f45968db9084da9edbdbc1aae1107b03410a3473b1a09cd8
description: Reference for the gatewaySettings entity to configure the Tableau Server gateway via JSON.
---
[跳转到主要内容](#main-content)

# gatewaySettings 实体

您必须为 Tableau Server 计算机配置网关设置。

使用下面的配置文件模板创建一个 json 文件。使用适当的值填充各个选项之后，使用以下命令传递 json 文件并应用设置：

`tsm settings import -f /path/to/file.json`

`tsm pending-changes apply`

如果待定更改需要重新启动服务器，`pending-changes apply` 命令将显示一个提示，告知您将进行重新启动。即使服务器已停止，此提示也会显示，但在这种情况下不会重新启动。您可以使用 `--ignore-prompt` 选项隐藏提示，但这样做不会改变重新启动行为。如果更改不需要重新启动，则会在不提示的情况下应用更改。有关详细信息，请参见[tsm pending-changes apply](https://help.tableau.com/current/server-linux/zh-cn/cli_pending-changes.htm#pending-changes-apply)。

### 网关设置

以下模板中的网关设置指定 Tableau Server 的 HTTP 设置。我们建议使用 SSL/TLS。Tableau Server 采用硬编码以将端口 443 用于 SSL/TLS。因此，如果启用 SSL，则不需要更新 gatewaySettings 实体。

### 配置模板

使用此模板配置网关设置。

**重要信息：**所有实体选项均区分大小写。

有关配置文件、实体和密钥的更多说明，请参见[配置文件示例](https://help.tableau.com/current/server-linux/zh-cn/config_file_example.htm)。

{
  "configEntities": {
	 "gatewaySettings": {
	  "\_type": "gatewaySettingsType",
	   "port": 80,
	   "sslRedirectEnabled": true,
	   "publicHost": "localhost"
	 }
	}			
 }

### 配置文件参考

此表包括可随 `"gatewaySettings"` 实体集一起包括的所有选项。

\_type

必需。

值：`"gatewaySettingsType"`

请不要更改。

port

指定 HTTP 端口。默认端口为端口 80。

sslRedirectEnabled

选项：`true` 或 `false`。

publicHost

指定 http/s 服务的主机名。

trustedIPs

指定与 Tableau Server 通信的受信任 IP 地址。受信任的 IP 地址包括上游代理服务器，以及用于向 Tableau Server 进行受信任的身份验证的服务器。请参见[为 Tableau Server 配置代理和负载平衡器](https://help.tableau.com/current/server-linux/zh-cn/proxy.htm)和[向 Tableau Server 添加受信任的 IP 地址或主机名称](https://help.tableau.com/current/server-linux/zh-cn/trusted_auth_trustIP.htm)。

如果您在群集中运行 Tableau Server，则群集的所有其他节点将自动包含在该实体更新的相应配置文件中。因此，如果为 `trustedIPs` 指定新值，则必须在值中包含其他节点的 IP 地址。

此选项采用字符串列表，该列表要求以引号或方括号传递每个 IP 或主机，用逗号（无空格）分隔。例如：`["192.168.1.101","192.168.1.102","192.168.1.103"]` 或 `["webserv1","webserv2","webserv3"]`。

trustedHosts

指定与 Tableau Server 通信的受信任 IP 地址。通常，此值包含上游代理服务器的列表。trustedHosts 中的值用于确定客户端请求目标。

如果您在群集中运行 Tableau Server，则群集的所有其他节点将自动包含在该实体更新的相应配置文件中。因此，如果为 `trustedIPs` 指定新值，则必须在值中包含其他节点的 IP 地址。

此选项采用字符串列表，该列表要求以引号或方括号传递每个 IP 或主机，用逗号（无空格）分隔。例如：`["192.168.1.101","192.168.1.102","192.168.1.103"]` 或 `["webserv1","webserv2","webserv3"]`。