Answer the question
In order to leave comments, you need to log in
Why doesn't WebSocket work on Windows Server 2012 R2?
Good afternoon!
There are two computers:
1) Home working PC:
AMD Ryzen 7 1700 + 16Gb + Windows 10 Pro 1709 x64 + OpenServer ( Apache-PHP-7-x64 + Nxinx-1.10 )
2) Test server:
XEON X3470 + 12Gb + Windows Server 2012 R2 x64 + OpenServer ( Apache-PHP-7-x64 + Nxinx-1.10 )
i.e. the configuration is identical, except for the conceptually different OS, of course.
As a library, downloaded:
https://github.com/ratchetphp/Ratchet
Quickly made a project in phpStorm. A simple console. Which either "mirrors" the commands, or performs some kind of action. For example, stops or restarts the server. Moreover, when restarting, the client receives a "signal" about the need to reconnect.
Everything cool. All fire. The test was passed successfully, you can "sculpt" the normal functionality.
I decided to transfer the example to the test server. To see how this thing works there + how it works from the outside.
Moved the project. Restarted the server.
1) A tab with a websocket server --- "hangs" - this is normal in fact, because the web council has started its noose. Didn't give any errors.
2) Tab with websocket client --- can't connect to websocket server in any way...
Tried both by domain, and by 127.0.0.1, and by 192.168.1.3. At what telnet on 127.0.0.1 opens.
Now the error is:
test1.php:78 WebSocket connection to 'ws://127.0.0.1:5555/chat' failed: Error during WebSocket handshake: Unexpected response code: 403
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question