Nginx reverse proxy grafana accessgrafana always reminds me to configure grafana .ini ?

!!!!importance
Since the intranet is not accessible, I must access the intranet through the Extranet IP address, such as intranet A:80 I must use B:7280 to access port 80 of A

  1. This is my grafana .ini
[server]
domain = A
root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana/
serve_from_sub_path = true
  1. this is my nginx conf
server {
     listen       80;
    server_name  A;  # ip

  location /grafana/ {
    proxy_set_header Host $http_host;
    proxy_pass http://A:3000/;
  }

  # Proxy Grafana Live WebSocket connections.
  location /api/live {
    rewrite  ^/(.*)  /$1 break;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    proxy_set_header Host $http_host;
    proxy_pass http://A:3000/;
  }
}

Now I’m going to visit graffana via B:7280/grafana/ Look !

so there is another part to this network, yes? What controls the proxying between A:80 and B:7280

also, you should definitely try this setup without a sub-path if you can. sub-paths with grafana have a history of strange behavior

Im sorry. I just replied to you now. Yes, I cannot access the network where A is located. It belongs to the public IP, but penetrates through the intranet. I can access A using the same network as B. I set grafan.ini according to your settings, but it still doesn’t work. I checked through F12 that I couldn’t get js, css and other resources. I tried to proxy these through nginx, although he could let me enter the grafana page, But he still shows 404.