> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# remote_* 服务器设置

> remote_* 自动生成组中的 ClickHouse 服务器设置。

这些设置用于配置 ClickHouse 服务器，并由 ClickHouse 源代码自动生成。

## remote\_servers

供 [Distributed](https://clickhouse.com/docs/zh/reference/engines/table-engines/special/distributed.md) 表引擎和 `cluster` 表函数使用的集群配置。

**示例**

```xml theme={null}
<remote_servers incl="clickhouse_remote_servers" />
```

有关 `incl` 属性的值，请参见“[配置文件](https://clickhouse.com/docs/zh/concepts/features/configuration/server-config/configuration-files.md)”一节。

**另请参见**

* [skip\_unavailable\_shards](https://clickhouse.com/docs/zh/reference/settings/session-settings/skip-unavailable-shards.md#skip_unavailable_shards)
* [集群发现](https://clickhouse.com/docs/zh/guides/oss/deployment-and-scaling/cluster-discovery.md)
* [Replicated 数据库引擎](https://clickhouse.com/docs/zh/reference/engines/database-engines/replicated.md)

## remote\_url\_allow\_hosts

允许在与 URL 相关的存储引擎和表函数中使用的主机列表。

添加带有 `\<host\>` xml tag 的主机时：

* 应与 URL 中的写法完全一致，因为主机名会在 DNS resolution 之前进行检查。例如：`<host>clickhouse.com</host>`
* 如果在 URL 中显式指定了端口，则会将 host:port 作为一个整体进行检查。例如：`<host>clickhouse.com:80</host>`
* 如果指定主机时不带端口，则允许该主机的任意端口。例如：如果指定了 `<host>clickhouse.com</host>`，则允许 `clickhouse.com:20` (FTP)、`clickhouse.com:80` (HTTP)、`clickhouse.com:443` (HTTPS) 等。
* 如果将主机指定为 IP 地址，则会按 URL 中指定的内容进行检查。例如：`[2a02:6b8:a::a]`。
* 如果存在重定向且已启用对重定向的支持，则会检查每一次重定向 (location field) 。

例如：

```sql theme={null}
<remote_url_allow_hosts>
    <host>clickhouse.com</host>
</remote_url_allow_hosts>
```
