grafana/sample/nginx.conf

61 lines
1.6 KiB
Nginx Configuration File
Raw Normal View History

2013-05-14 11:27:15 -05:00
#
# Nginx proxy for Elasticsearch + Kibana
#
# In this setup, we are password protecting the saving of dashboards. You may
2013-09-13 15:52:13 -05:00
# wish to extend the password protection to all paths.
2013-05-14 11:27:15 -05:00
#
# Even though these paths are being called as the result of an ajax request, the
# browser will prompt for a username/password on the first request
#
# If you use this, you'll want to point config.js at http://FQDN:80/ instead of
# http://FQDN:9200
#
server {
listen *:80 ;
2013-09-13 15:52:13 -05:00
2013-05-14 11:27:15 -05:00
server_name kibana.myhost.org;
access_log /var/log/nginx/kibana.myhost.org.access.log;
location / {
root /usr/share/kibana3;
2013-09-13 15:52:13 -05:00
index index.html index.htm;
2013-05-14 11:27:15 -05:00
}
location ~ ^/_aliases$ {
proxy_pass http://127.0.0.1:9200;
proxy_read_timeout 90;
}
location ~ ^/_nodes$ {
proxy_pass http://127.0.0.1:9200;
proxy_read_timeout 90;
}
2013-05-14 11:27:15 -05:00
location ~ ^/.*/_search$ {
proxy_pass http://127.0.0.1:9200;
proxy_read_timeout 90;
}
2013-08-16 14:45:38 -05:00
location ~ ^/.*/_mapping$ {
proxy_pass http://127.0.0.1:9200;
proxy_read_timeout 90;
}
2013-09-13 15:52:13 -05:00
2013-05-14 11:27:15 -05:00
# Password protected end points
location ~ ^/kibana-int/dashboard/.*$ {
proxy_pass http://127.0.0.1:9200;
proxy_read_timeout 90;
2013-09-13 15:52:13 -05:00
limit_except GET {
proxy_pass http://127.0.0.1:9200;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/conf.d/kibana.myhost.org.htpasswd;
}
2013-05-14 11:27:15 -05:00
}
location ~ ^/kibana-int/temp.*$ {
proxy_pass http://127.0.0.1:9200;
proxy_read_timeout 90;
limit_except GET {
proxy_pass http://127.0.0.1:9200;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/conf.d/kibana.myhost.org.htpasswd;
}
2013-05-14 11:27:15 -05:00
}
}