Kibana仪表板无法与Nginx连接

问题描述 投票:2回答:3

嗨,我正在尝试使用Nginx作为反向代理访问Kibana 4仪表板。仪表板的位置在最新的kibana中不可用,但可以使用URL进行访问。

Kibana和Nginx均在本地运行,并安装在C:\中安装的Windows计算机上]

Kibana在localhost:5601上运行。我安装了NGinx并将其配置为在端口80上运行。Nginx的配置文件如下所示。

http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    server {
        listen       80;
        server_name  127.0.0.1:5601;


        location / {
            root   html;
            index  index.html index.htm;
        }


        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

       location ~ {
            proxy_pass  http://127.0.0.1:5601;
            #proxy_redirect https://kibana/;
        }
}

但是当我在浏览器中输入本地主机时,

“欢迎使用nginx!

如果您看到此页面,则说明nginx Web服务器已成功安装并运行。需要进一步的配置。

有关在线文档和支持,请访问nginx.org。可从nginx.com获得商业支持。

感谢您使用nginx。“

Kibana与:localhost:5601正常工作。我还需要对Kibana配置文件进行任何更改吗?我想通过NGinx通过localhost:80访问kibana仪表板。

谢谢

嗨,我正在尝试使用Nginx作为反向代理访问Kibana 4仪表板。仪表板的位置在最新的kibana中不可用,但可以使用URL进行访问。 Kibana and ...

nginx elasticsearch reverse-proxy kibana kibana-4
3个回答
1
投票

更改“服务器名称127.0.0.1:5601;”到“ server_name localhost:80;”


0
投票

我已将我的nginx配置为反向代理kibana-4仪表板。以下nginx配置为我完成了工作:


0
投票

这里是您如何使用letencrypt在https上通过nginx kibana和ES代理到远程服务器上的kibana的代理>

        server {
        listen [some_port] ssl http2;
        server_name [server_name];
        root /your/root/directoty;

        location /app {
        auth_basic "Restricted";
        auth_basic_user_file /etc/nginx/conf.d/yyyyyyyyy.passwd;
        proxy_pass http://example.com:5601;
       }


       location /bundles {
       proxy_pass  http://example.com:5601/bundles;
       }
       location /elasticsearch {
       proxy_pass [http://elasticsearch_server:9200;]
       }
       location /status {
       proxy_pass  http://example.com:5601/status;
       }
       location /api {
       proxy_pass  http://example.com:5601/api;
       }

       location /plugins {
       proxy_pass  http://example.com:5601/plugins;
       }


       location /ui {
       proxy_pass  http://example.com:5601/ui;
       }

       location /es_admin {
       proxy_pass  http://example.com:5601/es_admin;
       }

       location /built_assets {
         proxy_pass http://example.com:5601/built_assets;
       }

       location /node_modules {
         proxy_pass http://example.com:5601/node_modules;
       }

       location /translations {
         proxy_pass http://example.com:5601/translations;

       }

      location /internal {
        proxy_pass http://example.com:5601/internal;
      }   

     ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
     ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
     ssl_trusted_certificate /etc/letsencrypt/live/yourdomain.com/chain.pem;
     include snippets/ssl.conf;
     include snippets/letsencrypt.conf;

     access_log /var/log/nginx/xxxx.access.log;
     error_log /var/log/nginx/xxxxx.error.log;


     passenger_enabled on;
     passenger_min_instances 1;
     client_max_body_size 10m;

}
© www.soinside.com 2019 - 2024. All rights reserved.