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

**URL:** <https://community.grafana.com/t/nginx-reverse-proxy-grafana-accessgrafana-always-reminds-me-to-configure-grafana-ini/65916>\
**Category:** Configuration\
**Tags:** nginx\
**Created:** [May 19, 2022, 3:25am UTC](https://community.grafana.com/t/nginx-reverse-proxy-grafana-accessgrafana-always-reminds-me-to-configure-grafana-ini/65916 "2022-05-19T03:25:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wanduwandu](https://avatars.discourse-cdn.com/v4/letter/w/e9a140/32.png) [@wanduwandu](https://community.grafana.com/u/wanduwandu)\
**Post date:** [May 19, 2022, 3:25am UTC](https://community.grafana.com/t/nginx-reverse-proxy-grafana-accessgrafana-always-reminds-me-to-configure-grafana-ini/65916/1 "2022-05-19T03:25:50Z")

</div>

！！！！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

```auto
[server]
domain = A
root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana/
serve_from_sub_path = true

```

1. this is my nginx conf

```auto
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 !

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/9/8/98456f344bedc93038a1225fa6d5e5cf4df9fb71.png)

---

<div class="post-metadata">

**Author:** ![anon70503803](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@anon70503803](https://community.grafana.com/u/anon70503803)\
**Post date:** [May 26, 2022, 7:01pm UTC](https://community.grafana.com/t/nginx-reverse-proxy-grafana-accessgrafana-always-reminds-me-to-configure-grafana-ini/65916/2 "2022-05-26T19:01:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![wanduwandu](https://avatars.discourse-cdn.com/v4/letter/w/e9a140/32.png) [@wanduwandu](https://community.grafana.com/u/wanduwandu)\
**Post date:** [May 30, 2022, 1:13am UTC](https://community.grafana.com/t/nginx-reverse-proxy-grafana-accessgrafana-always-reminds-me-to-configure-grafana-ini/65916/3 "2022-05-30T01:13:31Z")

</div>

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.

 ![image0.png](https://us1.discourse-cdn.com/grafana/original/3X/6/1/61fa36ddb1ae52ea0942e226b4f4ddf212426792.png)
