-
Notifications
You must be signed in to change notification settings - Fork 767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On VPS IoServer works (HttpServer -> WsServer) Doesnt #998
Comments
You are listening on port |
@WyriHaximus Sorry thats a typo. I was trying different ports. They all have the same result. |
Additionally I was able to reach the websocket server by changing my proxy to redirect to ws. instead of wss. But my browser immediately closes the connection with a |
It's a bit harder to read without syntax highlighting 😅 . But you are also making a secure websocket connection instead of a plain text websocket connection and I don't see any certificate configuration in your PHP code |
@WyriHaximus Will work on that and report back. Thank you! |
Sigh no luck. Cant reach the websockets server once I add a SecureServer. Also tried port 8080 `$loop = Factory::create();
|
Have you tried the other way around first? Just plain text before you dive into setting up a secure server? TLS adds an additional debugging layer. |
$server = IoServer::factory(
new HttpServer(
new WsServer(
new Chat()
)
),
9005,
'0.0.0.0'
);
$server->run();
I wrote the following proxy. To add upgrade headers. I can see the raw headers when I run Ratchet only using IoServer::factory. So I know my request reaches the code. Once I add the HttpServer->WsServer code It no longer works. Port opens and is listening but websocket client will not connect.
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/wss [NC]
RequestHeader set Connection "Upgrade"
RequestHeader set Upgrade "websocket"
RewriteRule /wss/(.*) wss://127.0.0.1:9005/$1 [P,L]
The text was updated successfully, but these errors were encountered: