Skip to content

Secured connection #5

@krajcikondra

Description

@krajcikondra

Secured connections is not easy for configuration. There are some problems with handshake in react.

Easier way is:

  1. In apache load modules: proxy_http, proxy, proxy_wstunnel
    You can use command: a2enmod proxy_http proxy proxy_wstunnel

  2. To your httpd-vhost.conf add at the begin

ProxyPass /websocket ws://127.0.0.1:8888
ProxyPassReverse /websocket ws://127.0.0.1:8888

Traffic will be secured between client and proxy. After proxy will be communication unsecured.

  1. My neon configuration

webSockets: clients: storage: driver: @clients.driver.memory ttl: 0 server: httpHost: localhost port: 8888 address: 0.0.0.0 routes: '/test/<handle>' : 'Test"' mapping: *: App\WebsocketControllers\*Controller

I have not specified secured because between application and proxy is communication unsecured.

  1. In javascript connect to websocket server
    IPub.WebSockets.WAMP.initialize('wss://myweb.com/websockets');

This configuration works for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions