mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-03 02:42:19 +08:00
105 lines
4.2 KiB
Plaintext
105 lines
4.2 KiB
Plaintext
upstream minio_s3 {
|
|
server ${DOCKER_BRIDGE_GATEWAY}:${MINIO_PORT};
|
|
}
|
|
upstream im_web_front {
|
|
server ${DOCKER_BRIDGE_GATEWAY}:${OPENIM_WEB_PORT};
|
|
}
|
|
upstream im_admin_front {
|
|
server ${DOCKER_BRIDGE_GATEWAY}:${OPENIM_ADMIN_FRONT_PORT};
|
|
}
|
|
|
|
upstream im_msg_gateway {
|
|
server ${DOCKER_BRIDGE_GATEWAY}:${OPENIM_WS_PORT};
|
|
}
|
|
|
|
upstream im_api {
|
|
server ${DOCKER_BRIDGE_GATEWAY}:${API_OPENIM_PORT};
|
|
}
|
|
|
|
upstream im_chat_api {
|
|
server ${DOCKER_BRIDGE_GATEWAY}:${OPENIM_CHAT_API_PORT};
|
|
}
|
|
|
|
upstream im_admin_api {
|
|
server ${DOCKER_BRIDGE_GATEWAY}:${OPENIM_ADMIN_API_PORT};
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
#server_name hostname;
|
|
gzip on;
|
|
gzip_min_length 1k;
|
|
gzip_buffers 4 16k;
|
|
gzip_comp_level 2;
|
|
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png application/wasm;
|
|
gzip_vary off;
|
|
gzip_disable "MSIE [1-6]\.";
|
|
error_page 405 =200 $uri;
|
|
default_type application/wasm;
|
|
# base open
|
|
location ^~/openim-front/{ #web front
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
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://im_web_front/;
|
|
}
|
|
location ^~/openim-admin-front/{ #admin front
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
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://im_admin_front/;
|
|
}
|
|
location ^~/msg_gateway/ { #10001 ws msggateway
|
|
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://im_msg_gateway/;
|
|
}
|
|
location ^~/api/ { #10002 api openim-api
|
|
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://im_api/;
|
|
}
|
|
|
|
location ^~/chat/ { #10008 im_chat_api charserver chart
|
|
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://im_chat_api/;
|
|
}
|
|
location ^~/complete_admin/ { #10009 charserver admin
|
|
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://im_admin_api/;
|
|
}
|
|
location ^~/im-minio-api/ { #10009 minio admin
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_connect_timeout 300;
|
|
# Default is HTTP/1, keepalive is only enabled in HTTP/1.1
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
chunked_transfer_encoding off;
|
|
proxy_pass http://minio_s3/;
|
|
}
|
|
} |