Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagephp
titleSocket Server Config for above mentioned setup
$configuration = [
    'messageServer' => [
        //address: IP address to listen for connections of translate5 instances 
        // MUST match the server configured in messageServer config in the instance.  
        'address' => '127.0.0.1',
        
        //port:       Port to listen on.
        // MUST match the messagePort config in the instance. 
        'port' => '9057',
    ],
    'socketServer' => [
        //httpHost:   HTTP hostname clients intend to connect to. 
        // IMPORTANT MUST match the socketServer config in the translate5 instance and (if used) in Apache ProxyPass statement!
        //  In environments where an internal and external IP (AWS EC2 for example) is used, the ports must either mapped through, 
        //  or the httpHost should be set here to localhost where the proxypass points to too.
        // (MUST match JS `new WebSocket('ws://$httpHost');`)
        'httpHost' => 'example.translate5.net',
        
        //port:       Port to listen on.
        // MUST match the socketPort config in the instance. 
        'port' => '9056',
        
        //listen:    IP address to bind to. '0.0.0.0' for any interface.
        'listen' => '0.0.0.0',
        
        //route:    The URL path to be used for the socket server, defaults to /translate5 and should normally not to be changed.
        // When using SSL via ProxyPass, the proxy path (/tobedefined/ in the above example) MUST NOT added here!
        'route' => '/translate5', // IMPORTANT although the ProxyPass /wss is used in the example, this MUST NOT added here!
    ]
];

...