diff --git a/docs/guides/gettingStarted/nginxDomainConfig.mdx b/docs/guides/gettingStarted/nginxDomainConfig.mdx index 79a34e96a4..3204cf5ac7 100644 --- a/docs/guides/gettingStarted/nginxDomainConfig.mdx +++ b/docs/guides/gettingStarted/nginxDomainConfig.mdx @@ -3,9 +3,7 @@ title: '域名及SSL证书配置' sidebar_position: 8 --- - - -# 域名及SSL证书配置 +# 域名及 SSL 证书配置 ## 1. 前置条件 🛠️ @@ -120,6 +118,16 @@ server { chunked_transfer_encoding off; proxy_pass http://minio_s3_2/; } + + location ^~/im_open_rtc/ { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_set_header X-real-ip $remote_addr; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_pass http://127.0.0.1:17880; + } + } #Take the domain name "admin.xx.xx" for example @@ -200,6 +208,7 @@ server { ``` ## 3. Minio 配置 🗄️ + - **源码部署**: 修改 `config/minio.yml` 文件中的 `externalAddress` 为 `"https://web.your_domain.com/im-minio-api"`. - **Docker 部署**: 修改 `.env` 文件中的 `MINIO_EXTERNAL_ADDRESS` 为 `"https://web.your_domain.com/im-minio-api"`. @@ -209,14 +218,12 @@ server { ## 5. 登录验证 🔍 -- 访问IM web端:`web.your_domain.com` +- 访问 IM web 端:`web.your_domain.com` - 访问管理后台:`admin.your_domain.com` ## 6. 修改客户端 SDK 初始化参数 + 在客户端 SDK 中,配置初始化参数如下: - `apiAddr`: `https://your_domain.com/api` - `wsAddr`: `wss://your_domain.com/msg_gateway` - - - diff --git a/i18n/en/docusaurus-plugin-content-docs-guides/current/gettingStarted/nginxDomainConfig.mdx b/i18n/en/docusaurus-plugin-content-docs-guides/current/gettingStarted/nginxDomainConfig.mdx index 2918be30af..72147c5d4a 100644 --- a/i18n/en/docusaurus-plugin-content-docs-guides/current/gettingStarted/nginxDomainConfig.mdx +++ b/i18n/en/docusaurus-plugin-content-docs-guides/current/gettingStarted/nginxDomainConfig.mdx @@ -1,18 +1,22 @@ # Nginx Domain Configuration + ### 1. Prerequisites ->(1) Successful startup of open-im-server and chat (configuration of minio in open-im-server needs to be changed, refer to Step 3) ->(2) Successful installation of Nginx (including SSL module) +> (1) Successful startup of open-im-server and chat (configuration of minio in open-im-server needs to be changed, refer to Step 3) + +> (2) Successful installation of Nginx (including SSL module) ->(3) Successful application for two SSL certificates: test-web.rentsoft.cn, test-admin.rentsoft.cn +> (3) Successful application for two SSL certificates: test-web.rentsoft.cn, test-admin.rentsoft.cn ->(4) Ports 443 and 80 are open +> (4) Ports 443 and 80 are open ### 2. Domain Configuration Reference + Taking the Nginx installation directory **/usr/local** as an example, create a **config.conf** file in the **/usr/local/nginx** directory, paste the following template into the **/usr/local/nginx/config.conf** file, and import the newly created config.conf file into the general configuration file **/usr/local/nginx/nginx.conf** ->tips: Pay attention to replacing the domain names, SSL certificate paths, and SSL keys in the domain configuration template + +> tips: Pay attention to replacing the domain names, SSL certificate paths, and SSL keys in the domain configuration template ``` #open-im-server chat Corresponding deployment address and port @@ -114,6 +118,15 @@ server { chunked_transfer_encoding off; proxy_pass http://minio_s3_2/; } + + location ^~/im_open_rtc/ { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_set_header X-real-ip $remote_addr; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_pass http://127.0.0.1:17880; + } } # Take the domain name "test-admin.rentsoft.cn" for example @@ -193,6 +206,7 @@ server { ``` ### 3. Minio Configuration + Open **open-im-server/config/config.yaml**, modify the corresponding Minio content, and restart open-im-server. ```yaml @@ -209,10 +223,13 @@ signEndpoint: "https://test-web.rentsoft.cn/im-minio-api" //10005 ``` ### 4. Starting Nginx + Navigate to the **/usr/local/nginx/sbin** directory and execute the following command: + > ./nginx -s reload ### 5. Using the Corresponding Domain Names for Login Verification ->IM: test-web.rentsoft.cn ->Admin Backend: test-admin.rentsoft.cn \ No newline at end of file +> IM: test-web.rentsoft.cn + +> Admin Backend: test-admin.rentsoft.cn