2

I am trying to connect PHP web socket using WSS.

  • took code reference from below link

https://github.com/sanwebe/Chat-Using-WebSocket-and-PHP-Socket

  • it shows error as below

WebSocket connection to 'wss://php.fmv.cc:12345/' failed: Error in connection establishment: net::ERR_SSL_PROTOCOL_ERROR

  • server configuration as below

enter image description here

enter image description here

  • these are the links on which I am trying

http://php.fmv.cc/c2.php (ws)

https://php.fmv.cc/c3.php (wss)

this will try to connect socket at : ws://php.fmv.cc:12345/ and wss://php.fmv.cc:12345/

Thank you...

1
  • try with default port 8080 Commented Jul 13, 2020 at 10:31

1 Answer 1

2

Hello On the server configuration make setting like below

ProxyPass /wss/ ws://127.0.0.1:12345/
ProxyPassReverse /wss/ ws://127.0.0.1:12345/

and on client side you can connect it using your domain don't mentioned port with it.

use like wss://php.fmv.cc/wss

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.