> For the complete documentation index, see [llms.txt](https://www.axisnow.io/zh/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.axisnow.io/zh/docs/multi-edge/services/origins.md).

# 源站

登记一次源站，由服务内的多家 CDN 共用同一套回源配置

源站（Origin）是内容的来源：您的服务器、集群或云存储。边缘提供商收到访客请求后，向源站取内容再返回给访客。在 AxisNow 中，源站是服务（Service）的一项独立资产，先登记，再由域名引用。

## 源站与域名的关系 <a href="#origins-and-domains" id="origins-and-domains"></a>

源站属于服务，与域名是一对多的关系：一个源站可以同时被多个域名引用，也可以被同一个域名的多条路径规则引用。

对于一个站点一个源站的常见情况，您不需要关心这层关系：添加域名时填写的源站地址就是源站库里的一条记录，之后在 **源站** 标签页可以看到它。

## 源站的属性 <a href="#origin-attributes" id="origin-attributes"></a>

<table data-search="false"><thead><tr><th>属性</th><th>含义</th></tr></thead><tbody><tr><td>名称</td><td>便于识别的名称，例如 <code>web-backend</code>，可不填，列表中以地址代替</td></tr><tr><td>地址</td><td>源站地址，可以是一个域名，或者多个用逗号分隔的公网 IP。IP 与域名不能混填，多个 IP 由边缘轮询分担，没有健康检查</td></tr><tr><td>协议</td><td>边缘回源时使用的协议，见下文</td></tr></tbody></table>

**协议** 有三个选项：

* **跟随访客**（默认）：访客用 HTTPS 访问就用 HTTPS 回源，用 HTTP 访问就用 HTTP 回源。
* **HTTPS**：始终用 HTTPS 回源。Cloudflare 例外：它以 Full 模式回源，只有访客用 HTTPS 访问时才用 HTTPS 回源，访客用 HTTP 访问时仍以 HTTP 回源。
* **HTTP**：始终用 HTTP 回源。源站把 80 端口的请求跳转到 HTTPS 的，不能选这一项，否则访客会陷入跳转循环。

{% hint style="warning" %}
回源协议选错不是体验下降，而是站点不可用：源站强制 HTTPS 却被 HTTP 回源，访客会反复跳转；源站只有 HTTP 却被 HTTPS 回源，边缘返回 502。AxisNow 不探测源站，配置以您填写的为准，请按源站的实际情况选择。使用 HTTPS 回源时，CloudFront 会校验源站证书，Cloudflare 以 Full 模式回源不校验证书。
{% endhint %}

源站地址不能是本服务的任何业务域名、服务 CNAME，或任何边缘提供商的接入地址，这会造成回源循环。

## 添加与修改 <a href="#add-and-edit" id="add-and-edit"></a>

在服务的 **源站** 标签页点击 **添加源站**，填写名称、地址和协议。添加域名时直接填写的新地址也会出现在这里。

点击行尾的编辑图标修改源站。地址或协议的修改会同步到引用它的所有域名在各家边缘上的配置，期间这些域名的部署状态显示更新中。修改前请在 **域名** 标签页的 **源站** 列确认引用它的域名，避免影响到预期之外的站点。

一个域名要换到另一个源站，在 **域名** 标签页的 **源站** 列操作；同一个域名按路径使用不同源站，见[按路径回源](/zh/docs/multi-edge/services/domains/path-based-origin.md)。

## 删除 <a href="#delete" id="delete"></a>

被任何域名或路径规则引用的源站不能删除，控制台会提示引用它的域名数量。请先把这些域名指向其他源站，再删除。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.axisnow.io/zh/docs/multi-edge/services/origins.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
