【问题标题】:websocket on HTTPSHTTPS 上的 websocket
【发布时间】:2017-01-06 03:47:20
【问题描述】:

在本地服务器中我没有遇到这个问题,但是在具有 https 的生产服务器中它不起作用

Firefox ne peut établir de connexion avec le serveur à l’adresse 
wss://kergafa.com:8081/.

我尝试了多次,但找不到/不明白问题出在哪里?

我的 conf.yml

gos_web_socket:
   server:
      port: 8081 #The port the socket server will listen on
      host: kergafa.com #The host ip to bind to
      router:
         resources:
            - '@SkiesAdherentBundle/Resources/config/pubsub/routing.yml
   client:
      firewall: main
      session_handler: '@session.handler.pdo'
   pushers:
   wamp:
      host: kergafa.com
      port: 8081

当我启动服务器时:

[2017-01-06 04:33:12] websocket.INFO: Starting web socket
[2017-01-06 04:33:12] websocket.INFO: Register periodic callback Gos\Bundle\WebSocketBundle\Periodic\PdoPeriodicPing, executed each 20 seconds 
[2017-01-06 04:33:12] websocket.INFO: Launching Ratchet on kergafa.com:8081 PID: 7698

所以它的工作原理

隧道配置

[websockets]
accept = 8080
connect = kergafa.com:8081

上面写着:

 [Started: /etc/stunnel/stunnel.conf] stunnel.

grep 8080 结果

tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 7694/stunnel4

【问题讨论】:

    标签: symfony ssl nginx websocket


    【解决方案1】:

    我编辑了你的帖子。在 config.yml 你有这个:

    router:
       resources:
          - '@SkiesAdherentBundle/Resources/config/pubsub/routing.yml
    

    但这看起来不对。我想一个简单的改变:

    router:
       resources:
          - @SkiesAdherentBundle/Resources/config/pubsub/routing.yml
    

    也许这就是问题所在?

    【讨论】:

    • 你有正确的复制/粘贴错误,但这不是我的问题。谢谢
    猜你喜欢
    • 2020-10-17
    • 2020-07-20
    • 2014-10-31
    • 1970-01-01
    • 2021-12-05
    • 1970-01-01
    • 2016-11-16
    • 2019-11-04
    • 2015-01-31
    相关资源
    最近更新 更多