S
S
split_horizon2019-06-18 11:21:28
linux
split_horizon, 2019-06-18 11:21:28

How to proxy requests to Kibana using NGINX?

Hello! Tell me how to send traffic to Kibana when contacting NGINX?
Kibana is running and listening on port 5601, when I type in the address bar I get to the kibana web interface, however, by installing nginx and adding the following code, I expected that there would be a redirect to kibana, but this does not happen.
The nginx config file is left by default.

server {
    listen 80;

    server_name kibana.domain.pro

    auth_basic "Restricted Access";
    auth_basic_user_file /etc/nginx/htpasswd.kibana;

    location / {
        proxy_pass http://localhost:5601;
        proxy_redirect default;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
blackbeard, 2019-06-18
@Black_beard_ast

The first thing that comes to mind is that you have problems with selinux. You can enter:
semanage port -a -p tcp -t http_port_t 5601

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question