title: Laravel beyondcode websockets do not connect
body: <p>I'm using this <a href="https://github.com/beyondcode/laravel-websockets" rel="noreferrer">Laravel websockets package</a> to have my own websocket server.</p>
  <p>As mentioned in <a href="https://docs.beyondco.de/laravel-websockets/1.0/getting-started/introduction.html" rel="noreferrer">package documentation</a>, I have this configuration:</p>
  <p><strong><code>.env</code> setting:</strong></p>
  <pre><code>PUSHER_APP_ID=761772
  PUSHER_APP_KEY=qwerty
  PUSHER_APP_SECRET=secret
  PUSHER_APP_CLUSTER=ap2
  </code></pre>
  <p><strong>broadcasting.php:</strong></p>
  <pre><code>    'pusher' =&gt; [
          'driver' =&gt; 'pusher',
          'key' =&gt; env('PUSHER_APP_KEY'),
          'secret' =&gt; env('PUSHER_APP_SECRET'),
          'app_id' =&gt; env('PUSHER_APP_ID'),
          'options' =&gt; [
              'cluster' =&gt; env('PUSHER_APP_CLUSTER'),
              'encrypted' =&gt; true,
              //'host' =&gt; '105.208.174.8', &lt;--I did test this too
              'host' =&gt; '127.0.0.1',
              'port' =&gt; 6001,
              'scheme' =&gt; 'https'//&lt;--Tested with http
          ],
      ],
  </code></pre>
  <p><strong>websockets.php:</strong></p>
  <pre><code>'apps' =&gt; [
      [
          'id' =&gt; env('PUSHER_APP_ID'),
          'name' =&gt; env('APP_NAME'),
          'key' =&gt; env('PUSHER_APP_KEY'),
          'secret' =&gt; env('PUSHER_APP_SECRET'),
          'enable_client_messages' =&gt; false,
          'enable_statistics' =&gt; true,
      ],
  ],
  </code></pre>
  <p><strong>bootstrap.js:</strong></p>
  <pre><code>/**
   * Echo exposes an expressive API for subscribing to channels and listening
   * for events that are broadcast by Laravel. Echo and event broadcasting
   * allows your team to easily build robust real-time web applications.
   */
  
  import Echo from 'laravel-echo'
  
  window.Pusher = require('pusher-js');
  
  window.Echo = new Echo({
      broadcaster: 'pusher',
      key: 'qwerty',
      wsHost: window.location.hostname,
      wsPort: 6001,
      disableStats: true,
      encrypted: true,
      enabledTransports: ['ws', 'wss'] //This was added from issue 86
  
  });
  </code></pre>
  <p><a href="https://github.com/beyondcode/laravel-websockets/issues/86" rel="noreferrer">This is issue number 86 in package repository</a></p>
  <p>I'm using letsencrypt with my <code>directadmin control panel</code> and this is my <em><code>SSL</code></em> part of <code>websockets.php</code> configuration:</p>
  <pre><code>    'ssl' =&gt; [
      /*
       * 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' =&gt; null,
      'local_cert' =&gt; '/home/myDomain/domains/myDomain/public_html/vendor/react/socket/examples/localhost.pem',
        //'local_cert' =&gt; '/usr/local/directadmin/data/users/myDomain/domains/myDomain.ir.cert',
      /*
       * Path to local private key file on filesystem in case of separate files for
       * certificate (local_cert) and private key.
       */
      //'local_pk' =&gt; null,
      'local_pk' =&gt; '/usr/local/directadmin/data/users/myDomain/domains/myDomain.ir.key',
  
      /*
       * Passphrase for your local_cert file.
       */
      'passphrase' =&gt; null,
      ],
  </code></pre>
  <p>But when I use <code>php artisan websockets:serve</code>, It seems there's something wrong about connection and the <code>myDomain.com/laravel-websockets</code> admin panel says:</p>
  <blockquote>
  <p>Channel's current state is unavailable</p>
  </blockquote>
  <p>and the console says:</p>
  <blockquote>
  <p>Firefox can’t establish a connection to the server at wss://myDomain.ir:6001/app/qwerty?protocol=7&amp;client=js&amp;version=4.3.1&amp;flash=false.</p>
  <p>pusher.min.js:8:6335
  The connection to wss://myDomain.ir:6001/app/qwerty?protocol=7&amp;client=js&amp;version=4.3.1&amp;flash=false was interrupted while the page was loading.</p>
  </blockquote>
  <p>Does anyone know what's my issue and how should I solve this?</p>