On the site, you need to create a socket connection. But for some reason, the application that works on LAN does not want to work on the remote server at all. I checked different servers and the problem is the same instead of the 101 switching protocol it gives out 200 ok. I have something to tell you that these are problems on the server. rather, you just need to properly set up. So here. As far as I would not google so I could not find anything .. maybe someone faced this problem ...
- By the way, about the already deleted question : perhaps you don’t need apache . as jfs correctly hinted there, the standard python libraries have their own implementation of the http server , it is often used by developers of all kinds of frameworks. in this situation, the “third-party” http-server ( apache , nginx , lighttpd , etc.) is simply not needed. - aleksandr barakin
- Well, how on the hosting then run the application written in pure python? - Fuad Ibrahimov
- I think it depends on how this application is implemented. create a new question in which you state what you have, what you want to achieve, what steps you have already taken. - aleksandr barakin
1 answer
as far as I know, websocket support is required on both sides, both from the client and from the server.
if this is the case, then probably your local http-server already has this support, and the third-party servers you have tested either do not have it or are not configured (correctly) to use websocket- s.
addition
apache version 2.4 and higher can proxy websocket connections to a websocket server . In the role of the latter in your case, as I understand it, there is a demon who listens, for example, port 8080 to localhost .
that is, according to the mentioned documentation, besides apache version 2.4 (and higher), it is necessary:
- enable proxy_wstunnel module for example, for debian -base distributions, with the following command:
$ sudo a2enmod proxy_wstunnel
- configure virtualhost in apache for proxying to
localhost:8080, using something like this directive:
proxypass "/ws2/" "ws://localhost:8080"
Denial of responsibility
stated in the supplement is written on the results of reading the documentation and the author has neither experience with websockets , nor even less experience with such a setting.
- are not configured most likely. just then such a question) how to set it up) - Fuad Ibrahimov
- thanks a lot) can you credit a documentation? - Fuad Ibrahimov
- Thanks a lot) I can unsubscribe about the results if interested. - Fuad Ibrahimov
- all new is interesting. write please. I will add / correct the answer if there are additions / corrections. or write your own answer. - aleksandr barakin