Skip to content

How can I use PHP Socket.IO with Nginx/SSL or without SSL? #301

@wbsartori

Description

@wbsartori

Currently I use the socket passing the port and default settings of the SSL certificate. I would like to be able to use SSL directly with nginx so that it can manage the certificate for me. I found other issues talking about usage, but I wasn't successful in any of them.

My instance runs around this call:

    $io = new SocketIO($port, $sslContext);

My SSL configuration is in this format:

$sslContext = [
    'ssl' => [
       'local_cert' => '/etc/nginx/ssl/nginx.crt',
       'local_pk' => '/etc/nginx/ssl/nginx.key',
       'allow_self_signed' => true,
       'verify_peer' => false
    ]
];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions