# Unable to configure Nginx as a reverse proxy for elasticsearch on another server

**URL:** <https://discuss.elastic.co/t/unable-to-configure-nginx-as-a-reverse-proxy-for-elasticsearch-on-another-server/17849>\
**Category:** Elasticsearch\
**Created:** [June 1, 2014, 5:09pm UTC](https://discuss.elastic.co/t/unable-to-configure-nginx-as-a-reverse-proxy-for-elasticsearch-on-another-server/17849 "2014-06-01T17:09:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hugo\_lassiege](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hugo_lassiege/32/1465_2.png) [@hugo\_lassiege](https://discuss.elastic.co/u/hugo_lassiege)\
**Post date:** [June 1, 2014, 5:09pm UTC](https://discuss.elastic.co/t/unable-to-configure-nginx-as-a-reverse-proxy-for-elasticsearch-on-another-server/17849/1 "2014-06-01T17:09:02Z")

</div>

Hi,

I'm trying to use Kibana on a server _A_ to access elasticsearch on a  
server _B_. elasticsearch is protected with a basic auth authentication on  
server B.

Kibana is also protected with basic authentication (and the same password)  
on server A.

I'm using this configuration  
[https://gist.github.com/hlassiege/179866de70c3d8d992ab](https://gist.github.com/hlassiege/179866de70c3d8d992ab) (inspired from here  
[https://github.com/johnhamelink/ansible-kibana/blob/master/templates/nginx.conf.j2](https://github.com/johnhamelink/ansible-kibana/blob/master/templates/nginx.conf.j2)  
)

I'm just trying the redirection by typing the following address :  
[http://A.com/es/\_search](http://A.com/es/_search) [http://a.com/es/\_search](http://a.com/es/_search) and I get a error 500. In  
the log I have :

2014/06/01 16:45:55 [error] 3721#0: \*1 rewrite or internal redirection  
cycle while internally redirecting to "/es/\_search", client: 192.168.50.1,  
server: [A.com](http://A.com), request: "GET /es/\_search HTTP/1.1", host: "[A.com](http://A.com)"

Any idea what could be wrong ?

Regards,

Hugo

--  
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/adc664a1-6f5f-4eac-acd5-2d69a6868200%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/adc664a1-6f5f-4eac-acd5-2d69a6868200%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:25am UTC](https://discuss.elastic.co/t/unable-to-configure-nginx-as-a-reverse-proxy-for-elasticsearch-on-another-server/17849/2 "2017-07-06T01:25:25Z")

</div>


