2015-05-15 75 views
0

我有kibana在本地主機上的端口9292上運行。當我鍵入http://ip_adress/kibana從端口9292的頁面將被加載,但道路仍將http://ip_address/kibana/index.html#/dashboard/file/default.json我所得到的卻是http://ip_adress:9292/index.html#/dashboard/file/default.json隱藏端口與路徑 - nginx

這裏我想實現的是是我的代碼:

server { 
    ... 
    location /kibana { 
     return 301 /kibana/; 
    } 
    location ~ /kibana/(.*) { 
      error_log /var/log/nginx/kibana-error.log debug; 
      proxy_pass http://ip_address:9292/$1; 
    } 
} 
+0

此[相似serverfault問題](http://serverfault.com/questions/601041/unable-to-configure-nginx-as-a - 另一臺服務器上的反向代理 - 彈性搜索)可能會有所幫助。請注意,在http:// FQDN:80 /上代替 http:// FQDN:9200'的部件爲'point config.js。 – mazerraxuz

回答

0

最後,我終於更新Kibana 3至4這有助於和現在,我使用此配置:

upstream kibana { 
    server 127.0.0.1:5601; 
} 
... 
location /kibana { 
    return 301 /kibana/; 
    } 
    location ~ /kibana/(.*) {  
    proxy_pass http://kibana/$1; 
}