# Kibana/nginx could not connect to elasticsearch

**URL:** <https://discuss.elastic.co/t/kibana-nginx-could-not-connect-to-elasticsearch/17971>\
**Category:** Elasticsearch\
**Created:** [June 7, 2014, 3:18am UTC](https://discuss.elastic.co/t/kibana-nginx-could-not-connect-to-elasticsearch/17971 "2014-06-07T03:18:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harsh\_Jha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harsh_jha/32/1501_2.png) [@Harsh\_Jha](https://discuss.elastic.co/u/Harsh_Jha)\
**Post date:** [June 7, 2014, 3:18am UTC](https://discuss.elastic.co/t/kibana-nginx-could-not-connect-to-elasticsearch/17971/1 "2014-06-07T03:18:28Z")

</div>

I have Elasticsearch and Kibana with nginx running on a EC2 instance but  
Kibana/nginx is not able to connect to Elasticsearch and I'm getting "Error  
Could not contact Elasticsearch at xxxxxxxx. Please ensure that  
Elasticsearch is reachable from your system".

When I see the nginx error logs, I get - [error] 13067#0: \*1 access  
forbidden by rule, client: xxxxx, server: 127.0.0.1, request: "GET  
/index.html HTTP/1.1", host: "xxxxx" [error] 13283#0: \*14 no user/password  
was provided for basic authentication, client: xxxxx, server: xxxxxx,  
request: "GET //cgi-bin/php5 HTTP/1.1", host: "xxxxx"

My conf file is - [http://pastebin.com/JuxifP2n](http://pastebin.com/JuxifP2n)

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e2305f08-53b6-4a45-84fb-5a11dd4c3801%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e2305f08-53b6-4a45-84fb-5a11dd4c3801%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:24am UTC](https://discuss.elastic.co/t/kibana-nginx-could-not-connect-to-elasticsearch/17971/2 "2017-07-06T01:24:02Z")

</div>


