Connecting to Secure Elasticsearch

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
Grunt
Posts: 17
Joined: Fri May 27, 2022 2:29 pm

Connecting to Secure Elasticsearch

Post by Grunt »

Is there a setting that I can put into the Elasticsearch config for SSL connections to Elasticsearch?
Thorsten
Posts: 15373
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Connecting to Secure Elasticsearch

Post by Thorsten »

Hi,

well, Elasticsearch will probably run on a different port, right?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Grunt
Posts: 17
Joined: Fri May 27, 2022 2:29 pm

Re: Connecting to Secure Elasticsearch

Post by Grunt »

Ya, I've changed my elasticsearch.php config file to

Code: Select all

<?php
$PMF_ES['hosts'] = ['https://elasticsearch.contoso.com:9200'];
$PMF_ES['index'] = 'phpmyfaq';
but it doesn't appear to connect and I'm not seeing any errors with debug enabled.
Grunt
Posts: 17
Joined: Fri May 27, 2022 2:29 pm

Re: Connecting to Secure Elasticsearch

Post by Grunt »

Any ideas on how to get this to work or troubleshooting steps? Any logging I can enable or a list of variables available?
Thorsten
Posts: 15373
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Connecting to Secure Elasticsearch

Post by Thorsten »

Hi,

did you try to enable TLS in Elasticsearch this way?

https://www.elastic.co/blog/configuring ... d-logstash

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Grunt
Posts: 17
Joined: Fri May 27, 2022 2:29 pm

Re: Connecting to Secure Elasticsearch

Post by Grunt »

Ya, there's really not any other way to configure it. When hitting the URL, it requests a username/password. Are there variables that can be entered in the elasticsearch.php file for user/pass?

Edit: Actually, I deviated from that process by using a publicly signed wildcard certificate.
Thorsten
Posts: 15373
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Connecting to Secure Elasticsearch

Post by Thorsten »

Does it work now?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Grunt
Posts: 17
Joined: Fri May 27, 2022 2:29 pm

Re: Connecting to Secure Elasticsearch

Post by Grunt »

It does not.
Thorsten
Posts: 15373
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Connecting to Secure Elasticsearch

Post by Thorsten »

Hi,

okay, I'll try that on my local development environment.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply