A
A
Arseniy2018-05-09 13:08:45
Apache HTTP Server
Arseniy, 2018-05-09 13:08:45

How to set up websocket proxying (via Apache)?

I needed to make the wss:// protocol work on a secure connection. Googled. Everywhere they say that you need to use proxying, and settings were written that needed to be inserted into apache2.conf. The site runs on ports 80 and 443. The socket server runs on port 7777 (ws://194.58.121.250:7777) The proxy_module and proxy_wstunnel_module modules are enabled. It remains only to correctly configure proxying. Now I have it in my config:

#До этого еще есть множество настроек.....
Include conf.d/
Include vhosts-default/
Include vhosts/
Listen 127.0.0.1:8080

<VirtualHost *:*>
  ProxyPreserveHost On	
  ProxyPass /websocket ws://194.58.121.250:7777
  ProxyPassReverse /websocket ws://194.58.121.250:7777
</VirtualHost>

I also tried to insert this code into a specific file with settings for the site (vhosts/...), but nothing worked either.
Who understands something here, please help :)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question