# Access Elasticsearch through host:9200/es instead of host:9200

**URL:** <https://discuss.elastic.co/t/access-elasticsearch-through-host-9200-es-instead-of-host-9200/217446>\
**Category:** Elasticsearch\
**Created:** [January 31, 2020, 6:28pm UTC](https://discuss.elastic.co/t/access-elasticsearch-through-host-9200-es-instead-of-host-9200/217446 "2020-01-31T18:28:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DougR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dougr/32/48095_2.png) [@DougR](https://discuss.elastic.co/u/DougR)\
**Post date:** [January 31, 2020, 6:28pm UTC](https://discuss.elastic.co/t/access-elasticsearch-through-host-9200-es-instead-of-host-9200/217446/1 "2020-01-31T18:28:23Z")

</div>

Is it possible to configure Elasticsearch to listen on an alternate URL without doing a URL rewrite at the load balancer? I.e., to listen at `https://host:9200/es` instead of `https://host:9200`?

My use case (of course) is that I'm going to be running in Kubernetes behind an ingress that's being shared with Kibana and Logstash on different URLs. (`/es`=Elasticsearch, `/beats`=Logstash Beats ingress, `/`=Kibana).

My preference would be to just have Elasticsearch/Logstash listening on the appropriate URLs, rather than have the ingress do a rewrite.

**Update**  
In effect, what I'm looking for is functionality similar to specifying `server.basePath` for Kibana.

---

<div class="post-metadata">

**Author:** ![DougR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dougr/32/48095_2.png) [@DougR](https://discuss.elastic.co/u/DougR)\
**Post date:** [February 4, 2020, 2:08pm UTC](https://discuss.elastic.co/t/access-elasticsearch-through-host-9200-es-instead-of-host-9200/217446/2 "2020-02-04T14:08:49Z")

</div>

This question was due to a misunderstanding of the functionality of `server.basePath`. Ended up having to do URL rewrite on everything.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [February 5, 2020, 9:58am UTC](https://discuss.elastic.co/t/access-elasticsearch-through-host-9200-es-instead-of-host-9200/217446/3 "2020-02-05T09:58:57Z")

</div>

indeed, there is no configuration parameter to URL paths around in Elasticsearch, rewriting on the proxy in front sounds like the best idea.

---

<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:** [March 4, 2020, 9:59am UTC](https://discuss.elastic.co/t/access-elasticsearch-through-host-9200-es-instead-of-host-9200/217446/4 "2020-03-04T09:59:02Z")

</div>

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