Graphite on nginx

Asked by Seth

I've just begun using nginx as my primary server and I am really liking it. I'd love to transition my graphite instance to it, however, I've run into a lot of issues trying to do so. I tried following this tutorial, http://www.frlinux.eu/?p=199, without success. I kept getting a 502 error and having permission errors on accessing the uwsgi_pass port. Would love to see if anyone has been able to get it accomplished and would be willing to share their setup. Thanks.

Question information

Language:
English Edit question
Status:
Answered
For:
Graphite Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Aman Gupta (tmm1) said :
#1

I would recommend using gunicorn, which is easy to put behind nginx or other reverse proxy.

Revision history for this message
Dossy Shiobara (dossy) said :
#2

I just got graphite running behind nginx, using flup and nginx's FastCGI support.

The core of the config that matters:

    location / {
        fastcgi_pass 127.0.0.1:9001;
        fastcgi_pass_header Authorization;
        fastcgi_intercept_errors off;
        include /etc/nginx/fastcgi_params;
        fastcgi_param SCRIPT_NAME "";
    }

NOTE: Apparently something about flup/graphite does NOT like having SCRIPT_NAME passed to it, so I emptied to param. You have NO IDEA how annoying this was to figure out ... hopefully this saves people countless hours of annoyance and troubleshooting.

Can you help with this problem?

Provide an answer of your own, or ask Seth for more information if necessary.

To post a message you must log in.