Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using in multible domains on one port #26

tellustheguru opened this issue Sep 30, 2019 · 3 comments

Using in multible domains on one port #26

tellustheguru opened this issue Sep 30, 2019 · 3 comments


Copy link

tellustheguru commented Sep 30, 2019

As @ws-h-ono wrote on allinurl/goaccess issue #444

"Can you somehow try to share web socket ports against multiple sites? (Maybe by using URL path like, wss://ws.domain/site.domain ?)"

I like that Idea, even I have limited ports to spare.

Copy link

imatasic commented Dec 9, 2019

You can use reverse proxy to do that
apache 2.4 +mod_proxy+ mod_proxy_wstunnel
gwsocket running on port 8080

add this to Apache virtual host configuration:

servername ws.domain

        SSLProxyEngine on
	ProxyPass "/site1"  "wss://"
        ProxyPassReverse "/site1"  "wss://"
	ProxyPass "/site2"  "wss://"
        ProxyPassReverse "/site2"  "wss://"

you can then access the websocket server in javascript by
var socket = new WebSocket('wss://ws.domain/site1');
var socket = new WebSocket('wss://ws.domain/site2');


Copy link

allinurl commented Dec 13, 2019

@imatasic Thanks for pointing that out!

Copy link

tellustheguru commented Jan 1, 2020

Hi @imatasic !

Could you send me a step by step instruction how to do this. I´m a newbie :)

What file do I put: var socket = new WebSocket('wss://ws.domain/site1'); etc ???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

3 participants