Skip to content

Instantly share code, notes, and snippets.

@alexalouit
Created May 30, 2017 11:33
Show Gist options
  • Save alexalouit/c9f022bf61bd00a63e86c35b34b19a29 to your computer and use it in GitHub Desktop.
Save alexalouit/c9f022bf61bd00a63e86c35b34b19a29 to your computer and use it in GitHub Desktop.
kibana apache reverse proxy and auth
# /etc/apache2/sites-available/kibana.conf
# create
<VirtualHost *:5601>
<Proxy *>
AuthUserFile /etc/kibana/kibana.htpasswd
AuthType basic
AuthName "Kibana"
require valid-user
</Proxy>
ProxyPass / http://127.0.0.1:5602/
ProxyPassReverse / https://127.0.0.1:5602/
LogLevel warn
ErrorLog /var/log/apache2/kibana_error.log
CustomLog /var/log/apache2/kibana_access.log combined
</VirtualHost>
# then
a2enmod proxy
a2enmod proxy_http
a2ensite kibana
htpasswd -c -d /etc/kibana/kibana.htpasswd user
service apache2 restart
# /etc/kibana/kibana.yml
# add
server.port: 5602
# then,
service kibana restart
# /etc/apache2/ports.conf
# add
Listen 5601
# then,
service apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment