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+
1215Taking the Nginx installation directory ** /usr/local** as an example,
1316create a ** config.conf** file in the ** /usr/local/nginx** directory, paste the following template into the ** /usr/local/nginx/config.conf** file,
1417and 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+
196210Open ** 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+
212227Navigate 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