Skip to content

Commit 3f44639

Browse files
authored
Merge pull request #265 from mo3et/nginx/docs
docs: update nginx contents.
2 parents 0c2876d + 8de6221 commit 3f44639

File tree

2 files changed

+38
-14
lines changed

2 files changed

+38
-14
lines changed

docs/guides/gettingStarted/nginxDomainConfig.mdx

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ title: '域名及SSL证书配置'
33
sidebar_position: 8
44
---
55

6-
7-
8-
# 域名及SSL证书配置
6+
# 域名及 SSL 证书配置
97

108
## 1. 前置条件 🛠️
119

@@ -120,6 +118,16 @@ server {
120118
chunked_transfer_encoding off;
121119
proxy_pass http://minio_s3_2/;
122120
}
121+
122+
location ^~/im_open_rtc/ {
123+
proxy_http_version 1.1;
124+
proxy_set_header Upgrade $http_upgrade;
125+
proxy_set_header Connection "Upgrade";
126+
proxy_set_header X-real-ip $remote_addr;
127+
proxy_set_header X-Forwarded-For $remote_addr;
128+
proxy_pass http://127.0.0.1:17880;
129+
}
130+
123131
}
124132
125133
#Take the domain name "admin.xx.xx" for example
@@ -200,6 +208,7 @@ server {
200208
```
201209

202210
## 3. Minio 配置 🗄️
211+
203212
- **源码部署**: 修改 `config/minio.yml` 文件中的 `externalAddress``"https://web.your_domain.com/im-minio-api"`.
204213
- **Docker 部署**: 修改 `.env` 文件中的 `MINIO_EXTERNAL_ADDRESS``"https://web.your_domain.com/im-minio-api"`.
205214

@@ -209,14 +218,12 @@ server {
209218

210219
## 5. 登录验证 🔍
211220

212-
- 访问IM web端`web.your_domain.com`
221+
- 访问 IM web 端`web.your_domain.com`
213222
- 访问管理后台:`admin.your_domain.com`
214223

215224
## 6. 修改客户端 SDK 初始化参数
225+
216226
在客户端 SDK 中,配置初始化参数如下:
217227

218228
- `apiAddr`: `https://your_domain.com/api`
219229
- `wsAddr`: `wss://your_domain.com/msg_gateway`
220-
221-
222-

i18n/en/docusaurus-plugin-content-docs-guides/current/gettingStarted/nginxDomainConfig.mdx

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
# Nginx Domain Configuration
2+
23
### 1. Prerequisites
3-
>(1) Successful startup of open-im-server and chat (configuration of minio in open-im-server needs to be changed, refer to Step 3)
44

5-
>(2) Successful installation of Nginx (including SSL module)
5+
> (1) Successful startup of open-im-server and chat (configuration of minio in open-im-server needs to be changed, refer to Step 3)
6+
7+
> (2) Successful installation of Nginx (including SSL module)
68
7-
>(3) Successful application for two SSL certificates: test-web.rentsoft.cn, test-admin.rentsoft.cn
9+
> (3) Successful application for two SSL certificates: test-web.rentsoft.cn, test-admin.rentsoft.cn
810
9-
>(4) Ports 443 and 80 are open
11+
> (4) Ports 443 and 80 are open
1012
1113
### 2. Domain Configuration Reference
14+
1215
Taking the Nginx installation directory **/usr/local** as an example,
1316
create a **config.conf** file in the **/usr/local/nginx** directory, paste the following template into the **/usr/local/nginx/config.conf** file,
1417
and import the newly created config.conf file into the general configuration file **/usr/local/nginx/nginx.conf**
15-
>tips: Pay attention to replacing the domain names, SSL certificate paths, and SSL keys in the domain configuration template
18+
19+
> tips: Pay attention to replacing the domain names, SSL certificate paths, and SSL keys in the domain configuration template
1620
1721
```
1822
#open-im-server chat Corresponding deployment address and port
@@ -114,6 +118,15 @@ server {
114118
chunked_transfer_encoding off;
115119
proxy_pass http://minio_s3_2/;
116120
}
121+
122+
location ^~/im_open_rtc/ {
123+
proxy_http_version 1.1;
124+
proxy_set_header Upgrade $http_upgrade;
125+
proxy_set_header Connection "Upgrade";
126+
proxy_set_header X-real-ip $remote_addr;
127+
proxy_set_header X-Forwarded-For $remote_addr;
128+
proxy_pass http://127.0.0.1:17880;
129+
}
117130
}
118131
119132
# Take the domain name "test-admin.rentsoft.cn" for example
@@ -193,6 +206,7 @@ server {
193206
```
194207

195208
### 3. Minio Configuration
209+
196210
Open **open-im-server/config/config.yaml**, modify the corresponding Minio content, and restart open-im-server.
197211

198212
```yaml
@@ -209,10 +223,13 @@ signEndpoint: "https://test-web.rentsoft.cn/im-minio-api" //10005
209223
```
210224
211225
### 4. Starting Nginx
226+
212227
Navigate to the **/usr/local/nginx/sbin** directory and execute the following command:
228+
213229
> ./nginx -s reload
214230
215231
### 5. Using the Corresponding Domain Names for Login Verification
216-
>IM: test-web.rentsoft.cn
217232
218-
>Admin Backend: test-admin.rentsoft.cn
233+
> IM: test-web.rentsoft.cn
234+
235+
> Admin Backend: test-admin.rentsoft.cn

0 commit comments

Comments
 (0)