summaryrefslogtreecommitdiff
path: root/roles/monitoring/graphite/web/templates/nginx-vhost.conf.j2
blob: 48b6ef730494cc9ed327451073ea1531562b256c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
server {
  listen {{ graphite_web_nginx_listen }};

  server_name _;

  location / {
    include uwsgi_params;
    uwsgi_pass 127.0.0.1:{{ graphite_web_uwsgi_port }};
  }
  rewrite ^/admin(.*)admin/([^/]+)/([^/]+)$ /media/$2/$3 redirect;
  location /media {
    alias /usr/share/python-django-common/django/contrib/admin/static/admin/;
  }
  location /static/ {
    alias /usr/share/graphite-web/static/;
  }

  access_log /var/log/nginx/access-graphite.log;
  error_log /var/log/nginx/error-graphite.log;
}