Kibana4 behind Apache2 Proxy

(Chris Hargraves) #1

I decided to use Apache as a reverse proxy based on some Googling and I am having an issue. I can get the proxy to work when I just put in and it asks me for the credentials I set up. However, when I put in the Kibana port, I can get to Kibana around apache. So will bypass the authentication I set up.

<VirtualHost *:80>
        ServerName loggingserver

  # Proxy
  ProxyRequests Off
  <Proxy *>
    Order Allow,Deny
    Allow from all
    AuthType Basic
    AuthName "Halt! This is a restricted area.  Please provide credentials."
    AuthUserFile /path/to/file.htpwd
    Require valid-user
  ProxyRequests Off
  ProxyPass /
  ProxyPassReverse /
  RewriteEngine on
  RewriteRule .*{REQUEST_URI} [P,QSA]

        ErrorLog ${APACHE_LOG_DIR}/kibana_error.log
        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/kibana_access.log combined

I tried to add a basepath to the kibana.yml config file but that strangely just adds extra paths to the url, which of course doesn't work at all.

Any ideas?

(Tyler Smalley) #2

You will need to add firewall rules to prevent access to the port directly.

(Chris Hargraves) #3

Well then, that was easy. Thank you so much. Everything works as intended and I'm ready to start filling it up with clients and custom visualizations.

(system) #4