nginx.conf 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #
  2. # Nginx proxy for Elasticsearch + Kibana
  3. #
  4. # In this setup, we are password protecting the saving of dashboards. You may
  5. # wish to extend the password protection to all paths.
  6. #
  7. # Even though these paths are being called as the result of an ajax request, the
  8. # browser will prompt for a username/password on the first request
  9. #
  10. # If you use this, you'll want to point config.js at http://FQDN:80/ instead of
  11. # http://FQDN:9200
  12. #
  13. server {
  14. listen *:80 ;
  15. server_name kibana.myhost.org;
  16. access_log /var/log/nginx/kibana.myhost.org.access.log;
  17. location / {
  18. root /usr/share/kibana3;
  19. index index.html index.htm;
  20. }
  21. location ~ ^/_aliases$ {
  22. proxy_pass http://127.0.0.1:9200;
  23. proxy_read_timeout 90;
  24. }
  25. location ~ ^/_nodes$ {
  26. proxy_pass http://127.0.0.1:9200;
  27. proxy_read_timeout 90;
  28. }
  29. location ~ ^/.*/_search$ {
  30. proxy_pass http://127.0.0.1:9200;
  31. proxy_read_timeout 90;
  32. }
  33. location ~ ^/.*/_mapping$ {
  34. proxy_pass http://127.0.0.1:9200;
  35. proxy_read_timeout 90;
  36. }
  37. # Password protected end points
  38. location ~ ^/kibana-int/dashboard/.*$ {
  39. proxy_pass http://127.0.0.1:9200;
  40. proxy_read_timeout 90;
  41. limit_except GET {
  42. proxy_pass http://127.0.0.1:9200;
  43. auth_basic "Restricted";
  44. auth_basic_user_file /etc/nginx/conf.d/kibana.myhost.org.htpasswd;
  45. }
  46. }
  47. location ~ ^/kibana-int/temp.*$ {
  48. proxy_pass http://127.0.0.1:9200;
  49. proxy_read_timeout 90;
  50. limit_except GET {
  51. proxy_pass http://127.0.0.1:9200;
  52. auth_basic "Restricted";
  53. auth_basic_user_file /etc/nginx/conf.d/kibana.myhost.org.htpasswd;
  54. }
  55. }
  56. }