Skip to content

Commit 2a0ee35

Browse files
committed
add virtual
1 parent 7160269 commit 2a0ee35

File tree

5 files changed

+71
-72
lines changed

5 files changed

+71
-72
lines changed

docs/zh/installation/linux/multiple-node-multiple-disk.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

docs/zh/installation/linux/single-node-multiple-disk.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

docs/zh/installation/linux/single-node-single-disk.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/zh/integration/virtual.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
title: "Virtual模式配置"
3+
description: "RustFS S3的Virtual模式配置模式和path style模式配置"
4+
---
5+
6+
# RustFS S3模式介绍
7+
8+
RustFS 100%的符合S3存储协议的要求,在S3存储时,请求路径分为两个模式:
9+
10+
1. 虚拟主机模式 (Virtual Host Style)
11+
12+
2. 路径模式 (Path Style)
13+
14+
这两种模式的核心区别在于如何将存储桶(Bucket)的名称放入请求的 URL 中。
15+
16+
17+
18+
|特性 |虚拟主机模式 (Virtual Host Style) |路径模式 (Path Style)|
19+
| - | - | - |
20+
|URL 格式 |https://<bucket>.<endpoint>/<object> |https://<endpoint>/<bucket>/<object>|
21+
|存储桶位置 |在主机名(域名)中,作为子域名| 在 URL 路径中|
22+
|示例| https://my-bucket.s3.rustfs.com/cat.jpg| https://s3.rustfs.com/my-bucket/cat.jpg|
23+
24+
25+
26+
27+
28+
## 1. Path style mode
29+
30+
在启动的时,默认使用Path style模式。Path style模式的特点是桶名在Endpoint接入端点后,假设主机名为rustfs.com,桶名为test,那么Path style拼接下来的路径为:
31+
32+
~~~
33+
http://rustfs.com/test
34+
~~~
35+
36+
注意:
37+
- 默认为Path style
38+
- 用户不用进行任何设置即为Path style模式
39+
40+
41+
## 2. Virtual Host Styl
42+
43+
44+
在启动的时,可以将模式改为Virtual Host Style。Virtual Host Style模式的特点是桶名在为域名的一部份,假设主机名为rustfs.com,桶名为test,那么Virtual Host Style拼接下来的路径为:
45+
46+
~~~
47+
http://test.rustfs.com/
48+
~~~
49+
50+
51+
设置Virtual Host Style的步骤如下:
52+
53+
1. 将你的域名泛解析至指定的服务器。 假设域名为rustfs.com,则可以将*.rustfs.com解析至指定的服务器;
54+
2. 如果是Linux修改 `/etc/default/rustfs` 文件,如果是Docker 或者 Kubernetes则修改yaml或者启动配置参数;
55+
3. 在配置文件中加入:`RUSTFS_SERVER_DOMAINS`, 将这个参数设置为 RUSTFS_SERVER_DOMAINS = "rustfs.com" ;
56+
4. 保存配置文件,然后使用 `systemctl restart rustfs` 重启服务。

docs/zh/sidebar.ts

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,13 @@ export const zhSidebar = [
55
collapsed: true,
66
home: true,
77
items: [
8-
{ text: 'Linux 安装',
9-
link: '/zh/installation/linux/index',
10-
collapsed: true,
11-
items: [
12-
{
8+
{
139
text: 'Linux 快速安装',
1410
link: '/zh/installation/linux/quick-start'
15-
},
16-
{
17-
text: '单机单盘安装',
18-
link: '/zh/installation/linux/single-node-single-disk'
19-
},
20-
{
21-
text: '单机多盘安装',
22-
link: '/zh/installation/linux/single-node-multiple-disk'
23-
},
24-
{
25-
text: '多机多盘安装',
26-
link: '/zh/installation/linux/multiple-node-multiple-disk'
27-
}
28-
]
11+
},
12+
{
13+
text: 'Linux详细安装',
14+
link: '/zh/installation/linux/index'
2915
},
3016
{
3117
text: 'Windows 安装',
@@ -43,8 +29,11 @@ export const zhSidebar = [
4329
// text: '云原生安装',
4430
// link: '/zh/installation/cloud-native/index'
4531
// },
46-
{
47-
text: '安装检查',
32+
33+
]
34+
},
35+
{
36+
text: '安装检查清单',
4837
link: '/zh/installation/checklists',
4938
collapsed: true,
5039
items: [
@@ -69,9 +58,7 @@ export const zhSidebar = [
6958
link: '/zh/installation/checklists/security-checklists'
7059
}
7160
]
72-
},
73-
]
74-
},
61+
},
7562
{
7663
text: '管理 RustFS',
7764
link: '/zh/management/index',
@@ -305,6 +292,10 @@ export const zhSidebar = [
305292
text: 'Nginx反向代理配置',
306293
link: '/zh/integration/nginx'
307294
},
295+
{
296+
text: '虚拟主机模式配置',
297+
link: '/zh/integration/virtual'
298+
},
308299
// {
309300
// text: 'GitLab',
310301
// link: '/zh/integration/gitlab',

0 commit comments

Comments
 (0)