> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify-mintlify-0dbda2de.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 在子路径下托管文档

> 使用 Cloudflare Workers、Vercel 重写规则或 nginx 反向代理，将你的 Mintlify 文档托管在主域名的类似 /docs 的子路径下。

将你的文档托管在类似 `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)，从而确保文档能够正确显示。
