Skip to content

Instantly share code, notes, and snippets.

@ptmp13
Created July 10, 2022 07:22
Show Gist options
  • Select an option

  • Save ptmp13/1eeb261f97ffb044c0c67caf79bc609a to your computer and use it in GitHub Desktop.

Select an option

Save ptmp13/1eeb261f97ffb044c0c67caf79bc609a to your computer and use it in GitHub Desktop.
<VirtualHost 1.1.1.1:80>
ServerName superprod-logs.lol.local
HostnameLookups Off
UseCanonicalName Off
ProxyPreserveHost On
ProxyRequests On
RedirectMatch 302 ^/forfun/?$ /forfun/$1
<LocationMatch /forfun/(.*)$>
ProxyPass http://forfun.kibana.local:5601/$1
ProxyPassReverse http://forfun.kibana.local:5601/
AuthName "AD"
AuthType form
AuthFormProvider ldap
AuthLDAPGroupAttribute member
AuthLDAPSubGroupClass group
AuthLDAPGroupAttributeIsDN On
AuthLDAPURL ldap://LDAP.lol.local:389/DC=test,DC=local?sAMAccountName?sub?(objectClass=*)
AuthLDAPBindDN srv_ldapuser
AuthLDAPBindPassword losdfsd123234
ErrorDocument 401 /kibana-login/index.html
Require valid-user
Session On
SessionCryptoPassphrase elk
SessionCookieName session path=/;httponly
Define ES_PASSWORD Welcome1
RequestHeader set Authorization "expr=Basic %{base64:%{tolower:%{REMOTE_USER}}:${ES_PASSWORD}}"
AuthFormLoginSuccessLocation /forfun
</LocationMatch>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment