diff --git a/docs/self-hosting/advanced/s3.mdx b/docs/self-hosting/advanced/s3.mdx index 58763b674a8a..f07dea949f04 100644 --- a/docs/self-hosting/advanced/s3.mdx +++ b/docs/self-hosting/advanced/s3.mdx @@ -53,6 +53,26 @@ In this documentation, S3 refers to a compatible S3 storage solution, which supp Additionally, since this access domain is often a separate URL, it needs to be configured to allow cross-origin access to the site. Otherwise, cross-origin issues will occur in the browser. + ### `S3_ENABLE_PATH_STYLE` + + Whether to enable the `path-style` access mode of S3. This option is disabled by default. If your S3 service provider uses `path-style`, set `S3_ENABLE_PATH_STYLE` to `1` to enable it. + + + + `path-style` and `virtual-host` are different ways to access buckets and objects in S3, with different URL structures and domain name resolutions. + + Assuming the domain name of the S3 service provider is s3.example.net, the bucket is mybucket, and the object is config.env, the specific differences are as follows: + - path-style: `s3.example.net/mybucket/config.env` + - virtual-host: `mybucket.s3.example.net/config.env` + + + + + + Common S3 cloud service providers often default to the `virtual-host` mode, while self-deployed services like Minio default to using `path-style`. Therefore, if you use Minio as the S3 service, you need to set `S3_ENABLE_PATH_STYLE=1`. + + + ## S3 Configuration Guide diff --git a/docs/self-hosting/advanced/s3.zh-CN.mdx b/docs/self-hosting/advanced/s3.zh-CN.mdx index 6543dc62a2e9..c8767898db24 100644 --- a/docs/self-hosting/advanced/s3.zh-CN.mdx +++ b/docs/self-hosting/advanced/s3.zh-CN.mdx @@ -55,6 +55,28 @@ S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com +### `S3_ENABLE_PATH_STYLE` + +是否启用 S3 的 `path-style` 访问模式。此选项默认禁用。如果您的 S3 服务提供商使用 `path-style`,请将 `S3_ENABLE_PATH_STYLE` 设置为 `1` 以启用它。 + + + +`path-style` 和 `virtual-host` 在 S3 中是访问 bucket 和 object 的不同方式,URL 的结构和域名解析不太一样 + +假设 S3 服务商的域名是 s3.example.net ,bucket为mybucket,object为config.env,具体区别如下: +- path-style : `s3.example.net/mybucket/config.env` +- virtual-host : `mybucket.s3.example.net/config.env` + + + + + +常见的 S3 Cloud 服务商往往默认采用 `virtual-host` 模式,而自部署服务 minio 则默认使用的是 `path-style`。 因此如果你使用了 minio 作为 S3 服务,你需要设置 `S3_ENABLE_PATH_STYLE=1` 。 + + + + + ## S3 配置指南