nginx.conf 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 ~ ^/.*/_search$ {
  26. proxy_pass http://127.0.0.1:9200;
  27. proxy_read_timeout 90;
  28. }
  29. location ~ ^/.*/_mapping$ {
  30. proxy_pass http://127.0.0.1:9200;
  31. proxy_read_timeout 90;
  32. }
  33. # Password protected end points
  34. location ~ ^/kibana-int/dashboard/.*$ {
  35. proxy_pass http://127.0.0.1:9200;
  36. proxy_read_timeout 90;
  37. limit_except GET {
  38. proxy_pass http://127.0.0.1:9200;
  39. auth_basic "Restricted";
  40. auth_basic_user_file /etc/nginx/conf.d/kibana.myhost.org.htpasswd;
  41. }
  42. }
  43. location ~ ^/kibana-int/temp.*$ {
  44. proxy_pass http://127.0.0.1:9200;
  45. proxy_read_timeout 90;
  46. limit_except GET {
  47. proxy_pass http://127.0.0.1:9200;
  48. auth_basic "Restricted";
  49. auth_basic_user_file /etc/nginx/conf.d/kibana.myhost.org.htpasswd;
  50. }
  51. }
  52. }