Posts

Showing posts from November, 2015

Connect js client to elasticsearch behing nginx

Reverse proxy for elasticsearch and kibana nginx setup server {   listen 8080;   server_name XXXXXXXX;    location / {      return 301 /elasticsearch/;    }    location /elasticsearch/ {      proxy_pass http://127.0.0.1:9500/;      proxy_redirect http://localhost:9500 /elasticsearch/;      auth_basic "Elasticsearch Authentication";      auth_basic_user_file /etc/elasticsearch/user.pwd;     }   location /kibana/ {       proxy_pass http://127.0.0.1:5601/;       proxy_redirect http://127.0.0.1:5601/ /kibana/;     } } Connect js client to elasticsearch behing nginx var elasticsearch = require('elasticsearch');  host =  {     protocol: 'http',     host: 'XXXXXXXX',     port: 8080,     path: '/elastics...