我想在我的服務器上運行elasticSearch-head插件,但我只能通過服務器端訪問它。如果我嘗試通過瀏覽器訪問它,它會嘗試連接,直到顯示「此頁面不可用」瀏覽器消息。ES頭插件不能通過瀏覽器工作
如果我在終端上鍵入"curl -v http://localhost:9200/_plugin/head/"
,我得到
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 9200 (#0)
> GET /_plugin/head/ HTTP/1.1
> User-Agent: curl/7.36.0
> Host: localhost:9200
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: text/html
< Content-Length: 1077
<
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>elasticsearch-head</title>
<link rel="stylesheet" href="dist/base/reset.css">
<link rel="stylesheet" href="dist/vendor.css">
<link rel="stylesheet" href="dist/app.css">
<script src="dist/i18n.js" data-baseDir="dist/lang" data-langs="en,fr,pt"></script>
<script src="dist/vendor.js"></script>
<script src="dist/app.js"></script>
<script>
window.onload = function() {
if(location.href.contains("/_plugin/")) {
var base_uri = location.href.replace(/_plugin\/.*/, '');
}
var args = location.search.substring(1).split("&").reduce(function(r, p) {
r[decodeURIComponent(p.split("=")[0])] = decodeURIComponent(p.split("=")[1]); return r;
}, {});
new app.App("body", {
id: "es",
base_uri: args["base_uri"] || base_uri,
auth_user : args["auth_user"] || "",
auth_password : args["auth_password"],
dashboard: args["dashboard"]
});
};
</script>
<link rel="icon" href="dist/base/favicon.png" type="image/png">
</head>
<body></body>
</html>
* Connection #0 to host localhost left intact
但是,如果我去一個瀏覽器和I型:X.X.X.X:9200/_plugin /頭/它只是不顯示任何東西。
什麼即時在這裏失蹤?任何猜測?
預先感謝您。
謝謝您的回答! 我試過了,但我得到了同樣的結果。瀏覽器等待並等待,直到我得到「這個網站不可用」:( – 2014-09-05 11:08:01