nginx.conf 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. # Password protected end points
  30. location ~ ^/kibana-int/dashboard/.*$ {
  31. proxy_pass http://127.0.0.1:9200;
  32. proxy_read_timeout 90;
  33. auth_basic "Restricted";
  34. auth_basic_user_file /etc/nginx/conf.d/kibana.myhost.org.htpasswd;
  35. }
  36. location ~ ^/kibana-int/temp.*$ {
  37. proxy_pass http://127.0.0.1:9200;
  38. proxy_read_timeout 90;
  39. auth_basic "Restricted";
  40. auth_basic_user_file /etc/nginx/conf.d/kibana.myhost.org.htpasswd;
  41. }
  42. }