isapir / lucee-websocket

Enables server WebSockets for Lucee via JSR-356 compliant servlet containers (e.g. Tomcat 8, Jetty 9.1, etc.)
GNU Lesser General Public License v2.1
17 stars 6 forks source link

Accessing endpoint using SSL like wss://… #14

Closed blazer82 closed 6 years ago

blazer82 commented 6 years ago

How would you go about accessing the websocket over SSL? We switched our page to https only, so Apache won't allow any unencrypted protocol upgrade requests.

When trying to access the endpoint using wss:// instead of ws:// there's an SSL handshake error -9847.

Any clues on how to do this are appreciated.

blazer82 commented 6 years ago

I got it working behind an Apache proxy. Basically something like this:

ProxyPassMatch ^/ws/(.*) ws://…:8888/ws/$1
paologroppo commented 4 years ago

Hi blazer82, I have the same handshake problem over https. Could you please tell me where to use ProxyPassMatch... to solve the problem? Thanks in advance

blazer82 commented 4 years ago

@paologroppo I honestly can't remember the exact solution and I don't have access to that code base anymore. You basically need to configure your apache (that is if you use apache!) to forward wss requests to your local ws. I suppose the line posted above is all you need (maybe with a modified port number?). I suggest to look up the ProxyPassMatch directive of apache for more information.