Skip to content

Instantly share code, notes, and snippets.

@khalib
Created January 9, 2014 18:57
Show Gist options
  • Select an option

  • Save khalib/8339846 to your computer and use it in GitHub Desktop.

Select an option

Save khalib/8339846 to your computer and use it in GitHub Desktop.
Nginx config template for Graphite as a virtual host
server {
listen 127.0.0.1:80;
server_name local.graphite.org;
access_log /usr/local/var/log/nginx/graphite.access.log;
error_log /usr/local/var/log/nginx/graphite.error.log;
root /var/www/graphite.org/source/www/docroot;
location / {
try_files $uri @rewrite;
}
location @rewrite {
rewrite ^/(.*)$ /index.php?q=$1 last;
}
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/graphite.org/source/www/docroot$fastcgi_script_name;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment