I am using Nginx to serve both graphite and grafana (they are all running on the same server - not my desktop). I am able to access graphite via Nginx. However, grafana cannot
I'm not sure if the OP has resolved their problem yet or not, but here's what worked for me:
I put graphite and grafana on the same site. Graphite exists at the root and grafana within /grafana/
This solves the cross site scripting problem without having to setup CORS: graphite and grafana are on the same site.
nginx site configuration:
upstream graphite {
server unix:///var/uwsgi/graphite-web.sock;
}
server {
listen 8080;
listen [::]:8080 ipv6only=on;
root /usr/share/graphite-web/;
server_name localhost;
location /static {
alias /usr/share/graphite-web/static;
}
location /grafana {
alias /usr/share/graphite-web/grafana;
}
location / {
uwsgi_pass graphite;
include /etc/nginx/uwsgi_params;
}
}
To access grafana, I therefore go to:
http://192.168.1.1:8080/grafana
(192.168.1.1 is my server's ip address)