在本地服务器中我没有遇到这个问题,但是在具有 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
所以它的工作原理
ctunnel 配置
[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
最佳答案
我编辑了你的帖子。在 config.yml 中你有这个:
router:
resources:
- '@SkiesAdherentBundle/Resources/config/pubsub/routing.yml
但这看起来不对。我认为一个简单的改变:
router:
resources:
- @SkiesAdherentBundle/Resources/config/pubsub/routing.yml
也许这就是问题所在?
关于symfony - HTTPS 上的网络套接字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41498620/