Grafana on-premise publish to internet

Hello everyone,

I have Grafana 8.5.4 on a local server (Linux Red Hat 7.9) of my company, and due to the need of a certain segment of internal clients, it has been necessary to expose it to the Internet. For which use the Azure Active Directory Application Proxy Connector service.

I have achieved the integration/publication, through the external URL I can reach my Grafana on-premise (attached image), however I cannot view the data of the indicators/dashboards – I only get an “Origin not allowed” message.

I have activated the debug mode to see if anything about the issue is recorded in the log, however, there are no error messages or any text to help me figure out the problem

I hope you can help me to solve this problem.

can you verify that you are proxying host headers? If not you will get a bad gateway error.

Here is what that config looks like in NGINX:

proxy_set_header Host $http_host;

not sure about your setup tho

1 Like

Is there any solution for this?

this solution does not work either…

I was running Grafana on Azure Kubernetes Services (AKS) with an Nginx Ingress in-front of the Grafana.

To accomplish the similar outcome as what mattabrams said for NGINX, I added this to my ingress object:
metadata.annotations.nginx.ingress.kubernetes.io/upstream-vhost: my-azure-app-proxy.domain.net

So that my ingress looked something like this:

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: grafana
  annotations:
    nginx.ingress.kubernetes.io/upstream-vhost: my-azure-app-proxy.domain.net # Matches the external domain
spec:
  ingressClassName: nginx
  tls:
    - hosts:
      - grafana-internal.my-domain.net
      secretName: grafana-internal-my-domain-net
  rules:
    - host: "grafana-internal.my-domain.net"
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: grafana-service
                port:
                  number: 3000
1 Like