Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Deployment]The data monitoring page opens 404. #2890

Open
chengzx98 opened this issue Nov 25, 2024 · 8 comments
Open

[Deployment]The data monitoring page opens 404. #2890

chengzx98 opened this issue Nov 25, 2024 · 8 comments

Comments

@chengzx98
Copy link

OpenIM Server Version

3.8.1

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Source Code Deployment

Issue Description and Steps to Reproduce

According to the official document source code deployment https://docs.openim.io/zh-Hans/guides/gettingStarted/imSourceCodeDeployment, the monitoring page reports an error 404, the chat is normal, and grafana can be opened normally using the ip+13000 port.
image
image
This file is changed to the domain name
image
I need help opening the page normally, please help me!

Screenshots Link

No response

@OpenIM-Robot
Copy link

Hello! Thank you for filing an issue.

If this is a bug report, please include relevant logs to help us debug the problem.

Join slack 🤖 to connect and communicate with our developers.

@skiffer-git
Copy link
Member

NGINX needs to be configured.

@chengzx98
Copy link
Author

I used the official file to configure it. Could you please tell me how to configure it?

@chengzx98
Copy link
Author

NGINX 需要进行配置。
Could you give me some guidance? Thanks.

@OpenIM-Robot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


NGINX needs to be configured.
Could you give me some guidance? Thanks.

@skiffer-git
Copy link
Member

You can configure it according to the standard Nginx method.

@chengzx98
Copy link
Author

chengzx98 commented Nov 26, 2024

`#open-im-server chat Corresponding deployment address and port
upstream msg_gateway{
#IM Message server address Multiple can be specified according to the deployment
server 127.0.0.1:10001;
}
upstream im_api{
#IM Group user api server address Multiple can be specified according to the deployment
server 127.0.0.1:10002;
}
upstream im_chat_api{
#IM Business version login registration server address Multiple can be specified according to the deployment
server 127.0.0.1:10008;
}
upstream im_admin_api{
#IM The admin address of the commercial version can specify multiple units according to the deployment situation
server 127.0.0.1:10009;
}
upstream minio_s3_2{
#Minio address can be assigned to multiple modules dependingon deployment
server 127.0.0.1:10005;
}
upstream pc_web{
#PC web address can be validate
server 127.0.0.1:11001;
}
upstream openim_admin{
#Admin backend address can be used for validation
server 127.0.0.1:11002;
}
upstream grafana{
#Admin backend address can be used for validation
server 127.0.0.1:13000;
}

Take the domain name "web.xx.xx" for example

server {
listen 443; #Listening on port 443
server_name im.xxx.xxx; #Your domain name
#ssl on;
#Path of pem file for ssl certificate
ssl_certificate /etc/nginx/ssl/cert.pem;
#Key file path of ssl certificate
ssl_certificate_key /etc/nginx/ssl/key.pem;

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]\.";

default_type application/wasm;

location / {
    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://pc_web/;
}

location /msg_gateway{
    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://msg_gateway/;
}

location ^~/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_set_header X-Request-Api $scheme://$host/api;
    proxy_pass http://im_api/;
}

location ^~/chat/{
    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 ^~/im-minio-api/ {
    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;

    proxy_http_version 1.1;
    proxy_set_header Connection "";
    chunked_transfer_encoding off;
    proxy_pass http://minio_s3_2/;
}

location ^~/im-grafana-api/ {
    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;

    proxy_http_version 1.1;
    proxy_set_header Connection "";
    chunked_transfer_encoding off;
    proxy_pass http://grafana/;
}

}

#Take the domain name "admin.xx.xx" for example
server {
listen 443 ssl; #listening port
server_name im-api.xxx.xxx 192.168.3.39; #Your domain server_name
#ssl on;
#Path of pem file for ssl certificate
ssl_certificate /etc/nginx/ssl/cert.pem;
#Key file path of ssl certificate
ssl_certificate_key /etc/nginx/ssl/key.pem;

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]\.";

default_type application/wasm;

location / {
    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://openim_admin/;

}

location /msg_gateway{
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://msg_gateway/;
}

location ^~/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_set_header X-Request-Api $scheme://$host/api;
    proxy_pass http://im_api/;
}

location ^~/chat/{
    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/{
    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/;
}

}

#Redirection from HTTP to HTTPS redirection
server {
listen 80;
server_name im.xxx.xxx;
rewrite ^(.*)$ https://$host$1 permanent;
}
`

@chengzx98
Copy link
Author

chengzx98 commented Nov 26, 2024

config/open-api.yml image

帮我看看,我配置的打开同样报错404

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants