httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damien Clark <damo.cla...@gmail.com>
Subject Re: [users@httpd] RE: Web sockets & proxypass - No protocol handler was valid for the URL
Date Mon, 11 Sep 2017 03:54:47 GMT
G’day Eric,

Thanks so much for taking the time to generate a working config.

Initially it didn’t work.

So I performed a packet capture outbound from my browser (which showed the Upgrade header),
and also inbound to the apache process and determined that the ‘Upgrade’ header was lost
somewhere in between.  Turned out to be my Squid proxy server as per this topic.  

http://lists.squid-cache.org/pipermail/squid-users/2017-January/013953.html <http://lists.squid-cache.org/pipermail/squid-users/2017-January/013953.html>

After bypassing the squid cache, your config below (and the SetEnvIf previously) worked perfectly.

My sincere thanks Eric.

Cheers,
D.


> On 11 Sep 2017, at 8:51 am, Eric Covener <covener@gmail.com> wrote:
> 
> For me, the setenvif worked but the overall test failed. I had misread
> something in how mod_proxy and mod_rewrite depend on eachother.
> 
> I don't know why your SetEnvIf didn't fire.
> 
> Here's what seemed to work for me:
> 
>  RewriteEngine ON
> 
>  RewriteCond %{HTTP:Upgrade} "(?i)websocket"
>  RewriteRule ^/(.*)$ ws://localhost:3000/$1 [P,L]
> 
>  RewriteRule ^/(.*)$ http://localhost:3000/$1 [P]
>  # Force a worker to be created w/o ProxyPass
>  <Proxy "http://localhost:3000">
>    ProxySet connectiontimeout=5
>  </Proxy>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 


Mime
View raw message