benjamincburns/websockproxy

Reverse proxy in Apache2 does not work

Closed this issue · 5 comments

Normal ws:// connections work beautifully. But wss:// does not work with apache2 reverse proxy settings. Can you share your code apache2 reverse proxy, please? Thanks.

Here is my setting in apache2:

`<VirtualHost *:443 *.4444>

ServerName relay.somesite.com

Header add Access-Control-Allow-Origin "*"

    SSLEngine on

    SSLCertificateFile /ssl/xxx.pem

    SSLCertificateKeyFile /ssl/xxx.key

ProxyPass / http://localhost:4444/

ProxyPassReverse / http://localhost:4444/

ProxyPreserveHost On

RewriteEngine on

RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]

RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]

RewriteRule .* ws://localhost:4444%{REQUEST_URI} [P]

`

wss://relay.somesite.com:4444 in emulator settings does not work. What am I doing wrong here?

I'm sorry but I can't assist with setting up Apache. I'd recommend asking on ServerFault or similar, as this is meant to be the issues page for websockproxy. While it's true that the two tools can be used together, they don't really have anything to do with one another.

I can use any web server technology. Can you share what did you use to set up on your end? Is it nginx? Apache2 obviously does not work with wss.

You should have at least suggested a solution. Instead, you closed this ticket. Not professional at all.

Never mind. I figure it out. Nginx works!

This is an open source project that I created and shared with the world for free. This is not professional work, you are not paying me, and you have no entitlement to my time.

If you want professional work with guaranteed support, hire someone.