Files
mintlify[bot] 93f848e73d docs: translate custom domain updates (#6465) into es, fr, zh (#6492)
Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>
2026-07-09 18:51:37 -07:00

34 lines
2.2 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "在子路径下托管文档"
description: "使用 Cloudflare Workers、Vercel 重写规则或 nginx 反向代理,将你的 Mintlify 文档托管在主域名的类似 /docs 的子路径下。"
keywords: ["子路径路由", "/docs 设置", "基础路径"]
boost: 3
---
将你的文档托管在类似 `your-domain.com/docs` 这样的子路径下,可将文档保留在主域名上,方便用户查找,同时为用户维护一致的品牌体验。
<div id="let-mintlify-manage-your-domain">
## 让 Mintlify 管理你的域名
</div>
如果你的域名不承载其他内容Mintlify 可以无需代理即可在你的子路径下提供文档服务。在控制台的 [Custom domain setup](https://app.mintlify.com/settings/deployment/custom-domain) 页面上,启用 **Host at** 开关,输入你的基础路径并添加你的域名。然后按照控制台中显示的 DNS 记录配置,将你的域名指向 Mintlify。有关设置说明请参见 [自定义域名](/zh/customize/custom-domain)。
只有当 Mintlify 可以接收该域名上的所有路径时,才使用此选项。
<div id="set-up-by-hosting-provider">
## 按托管服务商进行设置
</div>
如果你的域名上还运行着其他站点,请将你的托管服务商配置为将子路径代理到 Mintlify。请选择你的托管服务商并按照相应的设置说明操作。
- [Cloudflare](/zh/deploy/cloudflare):为你的域名配置 Cloudflare Workers使文档在你的子路径下提供服务。
- [AWS Route 53 and CloudFront](/zh/deploy/route53-cloudfront):使用 AWS 的 Route 53 DNS 和 CloudFront CDN将你的文档部署到你的子路径下。
- [Vercel](/zh/deploy/vercel):使用重写规则将你的文档部署到你的子路径下。
- [Custom reverse proxy](/zh/deploy/reverse-proxy):对于其他托管平台,设置反向代理以将你的文档部署到你的子路径下。
<div id="additional-configuration-for-strict-security-policies">
### 针对严格安全策略的额外配置
</div>
如果你在自定义域名上对所有流量进行代理,你可能需要配置代理或防火墙规则,以添加正确的 [headers](/zh/deploy/csp-configuration),从而确保文档能够正确显示。