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
ws to wss #161
Comments
Anyone? :( |
Try and toy around with |
Hello @igorw, I've been doing that for the last couple of days, trying the openssl command (openssl s_client -connect ws.acme.net:10088) gives me this (it doesn't look like there's any error at all):
Nginx logs don't show anything at all, like nothing was "handled" by Nginx. This is what I have in Nginx right now:
If I try to connect using wss://ws.acme.net:10088 nothing is shown on the Nginx logs, however, if I remove the ssl lines I get the following in the access log:
Not sure at this point what else I can test really... If you think of anything else I'll be more than glad to test it. Regards and thanks for the help. |
Some more tests... Not sure if there's anything else that I should change in Ratchet on somewhere else at this point. Ratchet WebSocket server is running at ws.acme.net:8888 This works (client connection string: ws://ws.acme.net:10088):
This doesn't work but it's fine because I'm trying to access wss but ssl is still disabled in Nginx (client connection string: wss://ws.acme.net:10088):
This doesn't work either but nothing is being written to the Nginx logs (client connection string same as before: wss://ws.acme.net:10088):
By the way, I'm running Nginx 1.4.4 in case someone is wondering. |
Ended up installing stunnel... I couldn't make it work with Nginx. |
Had similar problems with nginx installed from the ubtuntu 12.04.x Linux repository, which was an 1.2.x version: No connection possible via wss://. Using the wscat tool* didn't succeed, also. After trying around a lot i suspected nginx to be the root of the problem. So i uninstalled nginx, grabbed the latest of nginx via PPA*, installed it (for me it was a 1.6.2 version) and problems were gone. And as nginx config i wrote this, wich is based on the nginx websocket example:
The above works fine at least if i use Chrome Browser for Client.
[EDIT] 2014-12-04 20:22:00, added FF Fix and Link to the google groups post |
Hi @t3chn0r! Recently, I started using ratchet for my project using web socket. And now I am trying to use wss: for secured connection. My question is, how did you managed to use stunnel for ratchet. I saw your comment last Jan 24, 2014 that you ended up using stunnel. Did it worked? How? Can you help me out? Thanks! |
@makhulhet I also use the secure websockets with stunnel, which is easy to setup. I just run stunnel and specify the config location als argument, which has the following content:
That's all! Notice that I run the websocket server on port 8081 on the local machine, and that stunnel enables clients to connect to port 8080 with the wss protocol. |
Hi @makhulhet, using pretty much same values as @bobvandevijver:
Just replace domain.com with your domain. Regards |
@bobvandevijver, thanks dude... I'll try that config... by the way... i forgot to mention that I am currently running under apache web server.. will it work? @t3chn0r, I already used that configuration and it seems it doesn't work on mine.. maybe there's something else you did.. 😄 |
Hi @bobvandevijver, i tried the your configuration... but how am I going to run my server it seems they'll be having port conflict...
|
Ho @makhulhet, I just double checked my server and remembered that I ended up using haproxy instead as I was already using it and decided to not run and maintain the stunnel service when haproxy could also take care of that... If you need the haproxy setup that I'm using just let me know. |
Hi @t3chn0r, if im going to use haproxy instead of stunnel. Will it work with apache web server? |
@makhulhet Just change the port used in you websocket script to 8081, or interchange the ports in the stunnel config. I use Apache, works perfect. |
Awesome! It worked! I just need to create separate vhost for my webserver and add some ssl configuration to my vhost. Thanks! |
@bobvandevijver i used your code but its not working. i got apache 2.2 version in my server. |
I need some help as I've been trying to do this for the last couple of days without luck. I recently switched my application to https, everything is working fine except for websockets. If I still try to connect to my server using the address ws://ws.myserver.com:8888/ I get the following error now:
I guess this error makes sense as I'm trying to establish an unsecured connection from a secured site. So, I changed the connection string to wss://ws.myserver.com:8888/, and I know Ratchet doesn't support SSL as it will be too slow for PHP to handle.
Because I'm using Nginx I'm trying to do some kind of redirect from wss to ws to no avail. My Ratchet server is running in port 8888, I went ahead and changed the connection string to wss://ws.myserver.com:18888/ and then put these lines (based on documentation I found) in nginx but it still doesn't work...
Now, I get the following error, I guess something is still not quite right but at this point I'm lost...
Any ideas what I'm missing?
Appreciate any help...
The text was updated successfully, but these errors were encountered: