Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

630
Views
WSS Secure Websockets on Elastic Beanstalk with Apache PHP and Laravel

Having issues getting secure websockets to work in laravel on AWS elastic beanstalk.

They work fine in dev and production over http & ws.

In dev it works fine over https and wss.

In production (with all the same settings, just different certs) over https and wss i'm getting the following error

failed: Error in connection establishment: net::ERR_CONNECTION_CLOSED

Assuming a problem with the certificate or key, I've tried changing to an incorrect cert & key. Then the error changes to the following.

failed: Error in connection establishment: net::ERR_SSL_VERSION_OR_CIPHER_MISMATCH

So i'm assuming that the certificate isn't the issue.

Config as below: websockets.php

'apps' => [
    [
        'id' => env('PUSHER_APP_ID'),
        'name' => env('APP_NAME'),
        'key' => env('PUSHER_APP_KEY'),
        'secret' => env('PUSHER_APP_SECRET'),
        'path' => env('PUSHER_APP_PATH'),
        'capacity' => null,
        'enable_client_messages' => true,
        'enable_statistics' => true,
    ],
],
'ssl' => [
    /*
     * Path to local certificate file on filesystem. It must be a PEM encoded file which
     * contains your certificate and private key. It can optionally contain the
     * certificate chain of issuers. The private key also may be contained
     * in a separate file specified by local_pk.
     */
    'local_cert' => env('LARAVEL_WEBSOCKETS_SSL_LOCAL_CERT', null),

    /*
     * Path to local private key file on filesystem in case of separate files for
     * certificate (local_cert) and private key.
     */
    'local_pk' => env('LARAVEL_WEBSOCKETS_SSL_LOCAL_PK', null),

    /*
     * Passphrase for your local_cert file.
     */
    'passphrase' => env('LARAVEL_WEBSOCKETS_SSL_PASSPHRASE', null),


    'verify_peer' => false,
],

.env file

LARAVEL_WEBSOCKETS_SSL_LOCAL_CERT=/etc/pki/tls/certs/cert.cer
LARAVEL_WEBSOCKETS_SSL_LOCAL_PK=/etc/pki/tls/certs/server.key
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Please add a Passphrase to your Cert-File and to env('LARAVEL_WEBSOCKETS_SSL_PASSPHRASE', null).

I had same issues with Keystores without Password.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!