<p>I try to run grafana and nginx as reverse proxy in a kubernetes cluster and I already found this <a href="https://stackoverflow.com/questions/50410503/grafana-behind-nginx-reverse-proxy-returns-alert-title">answer</a> but this seems not to work for me. At least I get the same {{alert.title}}-Message as Oles. That's why I would like ask again and maybe someone can give me a hint what I am doing wrong?</p>

<p>The configuration for the grafana deployment contains the following part:</p>

<pre><code>env:
  - name: GF_SERVER_DOMAIN
    value: "k8s-4"
  - name: GF_SERVER_ROOT_URL
    value: "http://k8s-4/grafana"
</code></pre>

<p>and I don't modify the grafana.ini inside the container/pod.</p>

<p>Further I configure the nginx in the default.conf as following: </p>

<pre><code>server {
    listen       80;
    server_name  localhost k8s-4;

    location / {
        root   /usr/share/nginx/html;
        index  index.html index.htm;
    }

    location /grafana/ {
        proxy_pass http://k8s-4:30080/grafana;
        proxy_set_header X-Forwarded-Host k8s-4;
        proxy_set_header X-Forwarded-Server  k8s-4;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
  }
</code></pre>

<p>But as I say above this leads to the alert.title Error. But if I set the context to the root Element and configured the tools as follows:</p>

<p><strong>deployment:</strong></p>

<pre><code>env:
  - name: GF_SERVER_DOMAIN
    value: "k8s-4"
  - name: GF_SERVER_ROOT_URL
    value: "http://k8s-4"
</code></pre>

<p><strong>nginx - default.conf</strong></p>

<pre><code>server {
    listen       80;
    server_name  localhost k8s-4;

    location / {
        proxy_pass http://k8s-4:30080/grafana;
        proxy_set_header X-Forwarded-Host k8s-4;
        proxy_set_header X-Forwarded-Server  k8s-4;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

    location /grafana/ {
    }
}
</code></pre>

<p>it works...
That's why I am quite sure this is a problem with the deployment of grafana but I don't see the error. Maybe someone here can give me a little hint?    </p>

<p>Your first <code>server</code> setup is almost correct, you need to change the <code>proxy_pass</code> line to:</p>

<p><code>proxy_pass http://k8s-4:30080/;</code></p>
