# Enable https from logstash to elasticsearch

**URL:** <https://discuss.elastic.co/t/enable-https-from-logstash-to-elasticsearch/166074>\
**Category:** Logstash\
**Created:** [January 29, 2019, 3:40am UTC](https://discuss.elastic.co/t/enable-https-from-logstash-to-elasticsearch/166074 "2019-01-29T03:40:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BoffinPanda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boffinpanda/32/26225_2.png) [@BoffinPanda](https://discuss.elastic.co/u/BoffinPanda)\
**Post date:** [January 29, 2019, 3:40am UTC](https://discuss.elastic.co/t/enable-https-from-logstash-to-elasticsearch/166074/1 "2019-01-29T03:40:15Z")

</div>

I have enabled https in elasticsearch by following this guide

> **[X-Pack Security for Elasticsearch with Let's Encrypt™ Certificates
	  	 |...](https://www.elastic.co/blog/x-pack-security-for-elasticsearch-with-lets-encrypt-certificates)**
>
> Security via public key encryption is critical for your data. It seems not a day goes by where we don't hear of yet another hack, and unencrypted network communications allow for data theft to occur w...

Now, my elasticsearch is on https. The same does not work on logstash.

I have a conf file which would receive traffic at http port 9600 in logstash and logstash would forward it to Elasticsearch.

input {  
http {  
port =\> 9600  
response\_headers =\> {  
"Access-Control-Allow-Origin" =\> "\*"  
"Content-Type" =\> "text/json"  
"Access-Control-Allow-Headers" =\> "Origin, X-Requested-With, Content-Type, Accept"  
}  
}  
}  
output {  
elasticsearch {  
hosts =\> ["[https://website.com:9200](https://website.com:9200)"]  
index =\> "MyService-%{+YYYY.MM.dd}"  
}  
}

I want to make the port 9600 set to https.

How can I achieve this?

---

<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 26, 2019, 3:40am UTC](https://discuss.elastic.co/t/enable-https-from-logstash-to-elasticsearch/166074/2 "2019-02-26T03:40:19Z")

</div>

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