eZ Community » Forums » Install & configuration » How to run ezfind queries https?
expandshrink

How to run ezfind queries https?

How to run ezfind queries https?

Wednesday 22 August 2012 3:20:06 pm - 6 replies

I have a question about configuring ezfind so that all queries are done by https.

I have configured jetty, which is the frontend for solr to only accept connections through https, however all queries are sent to solr through http, even though i've configured ezfind.append.ini.php to use the https:// URLProtocol.

[SiteSettings]
URLProtocol=https://
IndexPubliclyAvailable=enabled
SearchOtherInstallations=enabled

Anybody else done this before and can help me?

Wednesday 22 August 2012 3:44:51 pm

HI.

If you are trying to talk to a secure version of solr, then the settings you need to change is in solr.ini:

solr.ini

[SolrBase]

SearchServerURI=http://localhost:8983/solr (yours may look different already)

I believe you need to change the protocol here from http:// to https:// as ezsolrbase actually does a pattern match on this to decide on ssl or not.

 

Additional info:

ezfind first tries to use curl for communication and if not, falls back php tcp:// filewrappers. In both cases, you need openssl installed for ssl based communication (curl->https:// or php->ssl://)

-David

 

Modified on Wednesday 22 August 2012 3:46:25 pm by David Ennis

Wednesday 22 August 2012 3:58:01 pm

Yes, offcourse I forgot to post my solr.ini.append.php where I have as you setup SearchServerURI=https://localhost:8443/solr

Both openssl and php-common is installed on my server, I guess this enables me to use curl. Further debug shows that by adding these two lines in the solrbase.php file

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);

I can get search results, but its unstable. Because it does not work where I use fetch functions in templates in ezpublish.

Wednesday 22 August 2012 4:19:51 pm

Quote from tofik sahraoui :

Yes, offcourse I forgot to post my solr.ini.append.php where I have as you setup SearchServerURI=https://localhost:8443/solr

Both openssl and php-common is installed on my server, I guess this enables me to use curl. Further debug shows that by adding these two lines in the solrbase.php file

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);

I can get search results, but its unstable. Because it does not work where I use fetch functions in templates in ezpublish.

 

 

Ohh.. Cool.. IN that case, see if you get better results NOT using curl by changing ezsolrbase.php:

 if ( extension_loaded( 'curl' ) )
to
 if ( false )

 

maybe this way you will have better luck with the ssl:// file wrapper..

 

-David

Wednesday 19 March 2014 10:19:59 am

Hi,

I went through the same problem and found a more elegant solution. 

The solution was to add the solr server certificate (and the intermediate certificate) to the trusted CURL certificates. 

This page will help you do it : http://www.warp1337.com/content/a...sl-certificate-chain-verification-ca

 

Hope this helps,

Regards,

Olivier

Modified on Thursday 20 March 2014 10:47:02 am by Olivier Yem

Wednesday 19 March 2014 10:35:09 am

Thanks for sharing Olivier!

Monday 11 September 2017 8:26:27 am

The reply has been removed because of violation of forum rules.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from