apache_ldap.conf 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Courtesy of https://github.com/sgzijl
  2. # config.js includes elasticsearch: "https://"+window.location.hostname+":443",
  3. <VirtualHost 1.2.3.4:80>
  4. ServerName your.domain.tld
  5. RewriteEngine On
  6. RewriteCond %{HTTPS} off
  7. RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
  8. </VirtualHost>
  9. <VirtualHost 1.2.3.4:443>
  10. ServerName your.domain.tld
  11. SSLEngine on
  12. SSLCertificateFile /path/to/public.crt
  13. SSLCertificateKeyFile /path/to/private.key
  14. DocumentRoot /path/to/kibana3
  15. <Directory /path/to/kibana3>
  16. Allow from all
  17. Options -Multiviews
  18. </Directory>
  19. LogLevel debug
  20. ErrorLog /path/to/logs/error_log
  21. CustomLog /path/to/logs/access_log combined
  22. # Set global proxy timeouts
  23. <Proxy http://127.0.0.1:9200>
  24. ProxySet connectiontimeout=5 timeout=90
  25. </Proxy>
  26. # Proxy for _aliases and .*/_search
  27. <LocationMatch "^(/_aliases|.*/_search|.*/_mapping)$">
  28. ProxyPassMatch http://127.0.0.1:9200
  29. ProxyPassReverse http://127.0.0.1:9200
  30. </LocationMatch>
  31. # Proxy for kibana-int/{dashboard,temp} stuff (if you don't want auth on /, then you will want these to be protected)
  32. <LocationMatch "^(/kibana-int/dashboard/|/kibana-int/temp).*$">
  33. ProxyPassMatch http://127.0.0.1:9200
  34. ProxyPassReverse http://127.0.0.1:9200
  35. </LocationMatch>
  36. # Optional disable auth for a src IP (eg: your monitoring host or subnet)
  37. <Location />
  38. Allow from 5.6.7.8
  39. Deny from all
  40. Satisfy any
  41. AuthLDAPBindDN "CN=_ldapbinduser,OU=Users,DC=example,DC=com"
  42. AuthLDAPBindPassword "ldapbindpass"
  43. AuthLDAPURL "ldaps://ldap01.example.com ldap02.example.com/OU=Users,DC=example,DC=com?sAMAccountName?sub?(objectClass=*)"
  44. AuthType Basic
  45. AuthBasicProvider ldap
  46. AuthName "Please authenticate for Example dot com"
  47. AuthLDAPGroupAttributeIsDN on
  48. require valid-user
  49. </Location>
  50. </VirtualHost>