Skip to content
This repository was archived by the owner on Oct 23, 2019. It is now read-only.

Cannot connect on site with https #12

Closed
sarfraznawaz2005 opened this issue Jul 14, 2017 · 5 comments
Closed

Cannot connect on site with https #12

sarfraznawaz2005 opened this issue Jul 14, 2017 · 5 comments

Comments

@sarfraznawaz2005
Copy link

Hi Alexandr,

I am successfully able to connect to server from non-https site (staging) but when I try to connect on live site which is on https, it just cannot connect.

I researched and found out that mod_proxy.so and mod_proxy_wstunnel.so should be used to proxy requests on apache v 2.4. I do have these modules enabled and right apache version and I have this in my apache config file:

<VirtualHost *:80>
ProxyPass /wss/ ws://x.x.x.x:8080/
</VirtualHost>

where x.x.x.x is site's IP.

Have you been in similar situation or what is your setup in case of https to be able to connect successfully ?

FYI, I am on siteground dedicated server.

@tabuna
Copy link
Owner

tabuna commented Jul 14, 2017

Hi, I do not use apache on the server.

Try:

Add this setting to your httpd.conf file

ProxyPass /wss2/ ws://x.x.x.x:8080/

Use this URL in your JavaSscript call when you want a WSS connection:

var ws = new WebSocket("wss://x.x.x.x/wss2/NNN"); //NNN - Your routing

Restart Apache web server

@sarfraznawaz2005
Copy link
Author

thanks, i will look into this.

@chantrea
Copy link

Hi I am having the same issues and I follow that step but it still didn't work it show me the errors Connection is refuse I am using apache 2.4.34. What should i do?

@mabuak
Copy link

mabuak commented Nov 22, 2018

Hi @chantrea, i have example apache conf, hope this will help you.

https://gist.github.com/mabuak/9e170d7e01a11b7c8ca01c6f8b9abc03

@chantrea
Copy link

@mabuak thank for your quick response can you please look to #35 and give me some advise on that please thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants