Skip to content

Commit 445ce5e

Browse files
committed
doc
1 parent 699f3bf commit 445ce5e

1 file changed

Lines changed: 19 additions & 12 deletions

File tree

docs/guides/gettingStarted/nginxDomainConfig.mdx

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ sidebar_position: 8
1111

1212
- **open-im-server****chat** 成功启动。
1313
- **Nginx** 已成功安装,包括 SSL 模块。
14-
- 成功申请两个域名及其 SSL 证书,例如:`web.xx.xx` (用于 IM 服务端及 Web 端), `admin.xx.xx`(用于管理后台)。
14+
- 成功申请两个域名及其 SSL 证书,例如:`web.your_domain.com` (用于 IM 服务端及 Web 端), `admin.your_domain.com`(用于管理后台)。
1515
- 开放 443 和 80 端口。
1616

1717
## 2. 域名配置模板 📝
@@ -57,9 +57,9 @@ server {
5757
server_name web.xx.xx; #Your domain name
5858
ssl on;
5959
#Path of pem file for ssl certificate
60-
ssl_certificate /usr/local/nginx/conf/ssh/web.xx.xx_bundle.pem;
60+
ssl_certificate /usr/local/nginx/conf/ssh/web.your_domain.com_bundle.pem;
6161
#Key file path of ssl certificate
62-
ssl_certificate_key /usr/local/nginx/conf/ssh/web.xx.xx.key;
62+
ssl_certificate_key /usr/local/nginx/conf/ssh/web.your_domain.com.key;
6363
6464
gzip on;
6565
gzip_min_length 1k;
@@ -125,12 +125,12 @@ server {
125125
#Take the domain name "admin.xx.xx" for example
126126
server {
127127
listen 443; #listening port
128-
server_name admin.xx.xx; #Your domain server_name
128+
server_name admin.your_domain.com; #Your domain server_name
129129
ssl on;
130130
#Path of pem file for ssl certificate
131-
ssl_certificate /usr/local/nginx/conf/ssh/admin.xx.xx_bundle.pem;
131+
ssl_certificate /usr/local/nginx/conf/ssh/admin.your_domain.com_bundle.pem;
132132
#Key file path of ssl certificate
133-
ssl_certificate_key /usr/local/nginx/conf/ssh/admin.xx.xx.key;
133+
ssl_certificate_key /usr/local/nginx/conf/ssh/admin.your_domain.com.key;
134134
135135
136136
gzip on;
@@ -194,22 +194,29 @@ server {
194194
#Redirection from HTTP to HTTPS redirection
195195
server {
196196
listen 80;
197-
server_name web.xx.xx;
197+
server_name web.your_domain.com;
198198
rewrite ^(.*)$ https://$host$1 permanent;
199199
}
200200
```
201201

202202
## 3. Minio 配置 🗄️
203-
204-
- **源码部署**: 修改 `config/minio.yml` 文件中的 `externalAddress``"https://web.xx.xx/im-minio-api"`.
205-
- **Docker 部署**: 修改 `.env` 文件中的 `MINIO_EXTERNAL_ADDRESS``"https://web.xx.xx/im-minio-api"`.
203+
- **源码部署**: 修改 `config/minio.yml` 文件中的 `externalAddress``"https://web.your_domain.com/im-minio-api"`.
204+
- **Docker 部署**: 修改 `.env` 文件中的 `MINIO_EXTERNAL_ADDRESS``"https://web.your_domain.com/im-minio-api"`.
206205

207206
## 4. 启动 Nginx 🚀
208207

209208
执行命令 `nginx -s reload` 以重载 Nginx 配置,启用新的域名设置。
210209

211210
## 5. 登录验证 🔍
212211

213-
- 访问IM web端:`web.xx.xx`
214-
- 访问管理后台:`admin.xx.xx`
212+
- 访问IM web端:`web.your_domain.com`
213+
- 访问管理后台:`admin.your_domain.com`
214+
215+
## 6. 修改客户端 SDK 初始化参数
216+
在客户端 SDK 中,配置初始化参数如下:
217+
218+
- `apiAddr`: `https://your_domain.com/api`
219+
- `wsAddr`: `wss://your_domain.com/msg_gateway`
220+
221+
215222

0 commit comments

Comments
 (0)