---
schema_version: "1"
id: 4f6dcd3d6b31352dc5cba51f93e6f10b8bf272bc40c6e2e4cdde43150fc1d4bd
title: gatewaySettings 實體
collection: tableau
version: current
locale: zh-tw
portal_url: https://docs.salesforce.com/tableau/current/zh-tw/server/entity_gateway.md
canonical_url: https://help.tableau.com/current/server/zh-tw/entity_gateway.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 5fd1b8ddd559a90f21532781caf22897a79a21d12ef7131472ec6b3cb9c4198b
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/zh-tw/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/zh-tw/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 位址包括上游 Proxy 伺服器，以及用於向 Tableau Server 進行受信任的驗證的伺服器。請參閱[為 Tableau Server 設定 Proxy 與負載平衡器](https://help.tableau.com/current/server/zh-tw/proxy.htm)和[向 Tableau Server 新增受信任的 IP 位址或主機名稱稱](https://help.tableau.com/current/server/zh-tw/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 位址。通常，此值包含上游 Proxy 伺服器的清單。trustedHosts 中的值用於確定用戶端請求目標。

如果您在叢集中執行 Tableau Server，則叢集的所有其他節點將自動包含在該實體更新的相應組態檔中。因此，如果為 `trustedIPs` 指定新值，則必須在值中包含其他節點的 IP 位址。

此選項採用字串清單，這需要以引號傳遞每個 IP 或主機，並用逗號（無空格）在括號中分隔。例如：`["192.168.1.101","192.168.1.102","192.168.1.103"]` 或 `["webserv1","webserv2","webserv3"]`。