I have Apache set up as a reverse proxy so that I can use https. Everything but websockets, and anything relying on them, seems to load when I visit the site. Unfortunately, I have had very little luck getting mod_proxy_wstunnel to work.
Firefox outputs these errors when I visit the homepage:
Network UI loaded
app.6489c481c2a5ca9d0668.js:42:2436494
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help http://xhr.spec.whatwg.org/
vendor.4f5ff2b0e1c182be9654.js:29:94434
Firefox can’t establish a connection to the server at wss://autoansible.lanecc.edu/websocket/.
app.6489c481c2a5ca9d0668.js:24:987679
The connection to wss://autoansible.lanecc.edu/websocket/ was interrupted while the page was loading.
app.6489c481c2a5ca9d0668.js:24:987679
Firefox can’t establish a connection to the server at wss://autoansible.lanecc.edu/websocket/.
app.6489c481c2a5ca9d0668.js:24:987679
The connection to wss://autoansible.lanecc.edu/websocket/ was interrupted while the page was loading.
app.6489c481c2a5ca9d0668.js:24:987679
Firefox can’t establish a connection to the server at wss://autoansible.lanecc.edu/websocket/.
app.6489c481c2a5ca9d0668.js:24:987679
The connection to wss://autoansible.lanecc.edu/websocket/ was interrupted while the page was loading.
app.6489c481c2a5ca9d0668.js:24:987679
Firefox can’t establish a connection to the server at wss://autoansible.lanecc.edu/websocket/.
app.6489c481c2a5ca9d0668.js:24:987679
The connection to wss://autoansible.lanecc.edu/websocket/ was interrupted while the page was loading.
app.6489c481c2a5ca9d0668.js:24:987679
Firefox can’t establish a connection to the server at wss://autoansible.lanecc.edu/websocket/.
app.6489c481c2a5ca9d0668.js:24:987679
The connection to wss://autoansible.lanecc.edu/websocket/ was interrupted while the page was loading.
…
Here is where I am right now:
RewriteEngine On #RewriteCond %{REQUEST_SCHEME} "wss" [NC] #RewriteCond %{REQUEST_SCHEME} "ws" [NC] #RewriteCond %{REQUEST_URI} ^/websocket/ [NC] #RewriteCond %{QUERY_STRING} transport=websocket [NC] RewriteCond %{HTTP:Upgrade} =websocket [NC] RewriteRule /(.*) wss://localhost:8080/$1 [P,L] RewriteCond %{HTTP:Upgrade} !=websocket [NC] RewriteRule /(.*) http://localhost:8080/$1 [P,L] #ProxyPreserveHost On #ProxyPass "/websocket/" "wss://127.0.0.1:8080/websocket/" #ProxyPass "/" "http://127.0.0.1:8080/" ProxyPassReverse "/" "http://localhost:8080/"
As you can see from the commented out lines, I’ve tried many things.
Much of what I have tried has come from https://stackoverflow.com/questions/27526281/websockets-and-apache-proxy-how-to-configure-mod-proxy-wstunnel?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
Of course the accepted answer is socket.io specific. So, yeah…
Any help would be appreciated.
I’m running the 1.0.6 branch and I set the dockerhub_version
to 1.0.6
as well. So I’m not building my own images.
host_port=8080
is set.