From 605ec41b304fc7f9be8e802f9e6d8e549d168fc4 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 2 Sep 2015 10:13:28 -0700 Subject: [PATCH] Fix websocket configuration Enable the proxy_websocket module. Correct the ProxyPass directives in use with websockets. The current versions result in 404 on socket.io.js because they strip the socket.io component of the path. Change-Id: I3505b4e9693602ec04baec2487871ce57a6dc7a6 --- manifests/apache.pp | 4 ++++ templates/etherpadlite.vhost.erb | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/manifests/apache.pp b/manifests/apache.pp index 9ff3b35..cc2dc45 100644 --- a/manifests/apache.pp +++ b/manifests/apache.pp @@ -58,6 +58,10 @@ class etherpad_lite::apache ( notify => Service['httpd'], require => File['/etc/apache2/conf-available/connection-tuning'], } + + httpd_mod { 'proxy_wstunnel': + ensure => present, + } } file { $docroot: diff --git a/templates/etherpadlite.vhost.erb b/templates/etherpadlite.vhost.erb index fb92b3a..754a4ec 100644 --- a/templates/etherpadlite.vhost.erb +++ b/templates/etherpadlite.vhost.erb @@ -74,8 +74,8 @@ RewriteCond %{REQUEST_URI} ^/socket.io [NC] RewriteCond %{QUERY_STRING} transport=websocket [NC] RewriteRule /(.*) ws://localhost:9001/$1 [P,L] - ProxyPass /socket.io http://localhost:9001 retry=0 - ProxyPassReverse /socket.io http://localhost:9001 + ProxyPass /socket.io http://localhost:9001/socket.io retry=0 + ProxyPassReverse /socket.io http://localhost:9001/socket.io ProxyPass / http://localhost:9001/ retry=0