# Securing ES With Apache

**URL:** <https://discuss.elastic.co/t/securing-es-with-apache/72500>\
**Category:** Elasticsearch\
**Created:** [January 23, 2017, 3:17pm UTC](https://discuss.elastic.co/t/securing-es-with-apache/72500 "2017-01-23T15:17:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Donglecow](https://avatars.discourse-cdn.com/v4/letter/d/779978/32.png) [@Donglecow](https://discuss.elastic.co/u/Donglecow)\
**Post date:** [January 23, 2017, 3:17pm UTC](https://discuss.elastic.co/t/securing-es-with-apache/72500/1 "2017-01-23T15:17:15Z")

</div>

Hi all,

I've been serving up ES instances on my local network using Apache. For testing, I need to expose one of the instances to the Internet, but I'm not the best with Apache. Is anyone able to offer advice on how to achieve the below configuration by using the Mod Rewrite (RewriteEngine, RewriteCond, RewriteRule) in Apache?

I already forward my ES deployment through a proxy (IE: [somesite.com/es/](http://somesite.com/es/)), I can restrict this to a whitelisted set of IPs easy enough.

I want to restrict the following HTTP protocols:  
Disable: PUT | DELETE | TRACE requests from all sources  
Restrict: POST to "[somesite.com/es/\_search](http://somesite.com/es/_search)" requests only from all sources  
Allow: GET from whitelisted IPs (don't really need help on this one)

Sorry if this is the wrong place to ask, but figured someone here may know!

Thanks in advance!

---

<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:** [February 20, 2017, 3:17pm UTC](https://discuss.elastic.co/t/securing-es-with-apache/72500/2 "2017-02-20T15:17:35Z")

</div>

Closed on February 20, 2017, 3:17pm UTC

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