# How can i access elasticsearch behind the nginx proxy server using python

**URL:** <https://discuss.elastic.co/t/how-can-i-access-elasticsearch-behind-the-nginx-proxy-server-using-python/145860>\
**Category:** Elasticsearch\
**Created:** [August 24, 2018, 7:34am UTC](https://discuss.elastic.co/t/how-can-i-access-elasticsearch-behind-the-nginx-proxy-server-using-python/145860 "2018-08-24T07:34:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wonki](https://avatars.discourse-cdn.com/v4/letter/w/aeb1de/32.png) [@wonki](https://discuss.elastic.co/u/wonki)\
**Post date:** [August 24, 2018, 7:34am UTC](https://discuss.elastic.co/t/how-can-i-access-elasticsearch-behind-the-nginx-proxy-server-using-python/145860/1 "2018-08-24T07:34:41Z")

</div>

Hi, I want to access to elasticsearch using python.  
The problem is, elasticsearch is behind the nginx proxy server.  
So how can i make instance?

i tried below but it doesn't work.  
from elasticsearch import Elasticsearch  
es = Elasticsearch({'host':'my nginx ip', 'port': 'my nginx port'})

---

<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:** [September 21, 2018, 7:34am UTC](https://discuss.elastic.co/t/how-can-i-access-elasticsearch-behind-the-nginx-proxy-server-using-python/145860/2 "2018-09-21T07:34:46Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
