Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

secondman's avatar

Scout CURL Error with SSL

I'm using Meilisearch and the Laravel Scout driver and have set up a Valet proxy from https://search.example.test to http://127.0.0.1:7700 and now I'm getting the obligatory curl SSL error:

cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://search.example.test/indexes/example_products/documents

I downloaded the cacert.pem file from haxx and moved it to /etc/ssl/certs, then updated my ini file and reloaded PHP.

I can now see clearly that I have it set:

Directive: curl.cainfo Local Value: /etc/ssl/certs/cacert.pem Master Value: /etc/ssl/certs/cacert.pem

Yet I'm still getting the error ... is there something else I need to do?

Thanks.

0 likes
6 replies
aurawindsurfing's avatar

@vkronlein sorry my initial though was that you were looking at this error in production. Looking thought the docs here: https://github.com/meilisearch/meilisearch-laravel-scout I can not see any reference to any proxy whatsoever.

Why do you think you need the proxy at all? Laravel valet is on your local machine, meilisearch is also on your local machine judging by your first post.

As long as you can telnet to 7700 you should be able to talk to it locally without any issues - unless it is not running?

secondman's avatar

Because both locally and in production I prefer to terminate my SSL through an Nginx proxy as opposed to trying to jump through 20 hoops to get things to run.

That's what Valet proxies are for, so you can pass a sub-domain from port 443 upstream to whatever service port it's running on. Works perfectly for websockets for example, or anything else normally.

The bigger issue here is why PHP is rejecting the cUrl pem file when it's both brand new, and is definitely registered correctly in my php.ini.

I've made sure to restart php, the only thing I haven't yet tried is restarting my Mac.

Could it be that PHP needs it to be found in a certain location?

aurawindsurfing's avatar
php --ini

will tell you which files you are using and should edit.

What happens when you do:

valet unproxy
secondman's avatar

I already know what files to edit, and HAVE already edited them. As It shows in my initial question, the PEM file is loaded in PHP.

I can access the local server through http://127.0.0.1:7700 but that's not what I'm trying to accomplish.

The site runs under SSL and so should the search, yes even in development.

Please or to participate in this conversation.