Hello,

I’ve just started to use Space and got an error. I use Laravel framework and tried to put simple txt file to bucket. When I do it, I have next error:

“Error executing "PutObject” on “http://**.fra1.digitaloceanspaces.com/1.txt”; AWS HTTP error: cURL error 60: SSL: no alternative certificate subject name matches target host name ’**.fra1.digitaloceanspaces.com’ (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

I don’t want to use SSL now and can’t disable it. My config is below:

    's3' => [
        'driver' => 's3',
        'scheme' => 'http',
        'visibility' => 'public',
        'key' => env('S3_KEY'),
        'secret' => env('S3_SECRET'),
        'region' => env('S3_REGION'),
        'bucket' => env('S3_BUCKET'),
        'endpoint' => env('S3_ENDPOINT'),
    ],

Does someone know how can I fix this issue?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi there,

I believe that the error is occurring as you are not using https:// for your Spaces URL.

So you need to change http://**.fra1.digitaloceanspaces.com/1.txt to https://**.fra1.digitaloceanspaces.com/1.txt

For more information, I would recommend following the steps here on how to integrating an S3-Compatible Object Storage into your Laravel Application:

https://www.digitalocean.com/community/tutorials/how-to-set-up-a-scalable-laravel-6-application-using-managed-databases-and-object-storage#step-5-%E2%80%94-integrating-an-s3-compatible-object-storage-into-the-application

Regards,
Bobby

by Bobby Iliev
by Erika Heidi
Data persistence and file storage represent two of the biggest challenges when horizontally scaling web applications. This is mainly due to the fact that it is hard to maintain consistency of variable data between multiple application nodes. A practical way of meeting these demands is by using managed databases and object storage. In this guide, we will update an existing Laravel 6 application to use a managed MySQL database and an S3-compatible object store.
Submit an Answer