Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

SSL Not working #47

Closed
maartenvw opened this issue Dec 11, 2018 · 3 comments
Closed

SSL Not working #47

maartenvw opened this issue Dec 11, 2018 · 3 comments

Comments

@maartenvw
Copy link

When connecting to the dashboard over https it works perfectly fine, but when I click on connect. I don't get connected and the console reports the following WebSocket connection to 'wss://socket.myapp.com:6001/app/my_key?protocol=7&client=js&version=4.3.1&flash=false' failed: WebSocket opening handshake timed out
My SSL configuration:

'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' => 'PATH_TO/cert.pem',

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

        /*
         * Passphrase for your local_cert file.
         */
        'passphrase' => null,
    ],

I am running this on a Vultr instance with PHP 7.2.10 and NGINX.

How can I resolve this issue?

@namsudtho
Copy link

namsudtho commented Dec 12, 2018

Hi @maartenvw
You just have to edit de app.php file in config directory Just find next lines
'local_pk' => 'PATH_TO/private.pem',

And.. chage it for:
'local_pk' => 'PATH_TO/private.key',
'verify_peer' => false,

@maartenvw
Copy link
Author

Hi all,

It wasn't an issue with the configuration the issue was that we use Cloudflare to manage our DNS and we had de orange cloud turned on so it was trying to connect to Cloudflare and not out server since cloudflare doesn't support (to my knowledge, correct me if i'm wrong) specifying ports.

So the issue is resolved by using another none orange cloud subdomain as a pointer to the websocket server.

Thanks for the help!

@stayallive
Copy link
Contributor

stayallive commented Dec 12, 2018

@maartenvw they do support it however not over port 6001 (80/443 should work fine) probably.

https://support.cloudflare.com/hc/en-us/articles/200169466-Can-I-use-Cloudflare-with-WebSockets-

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants