Browse Source

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
James E. Blair 3 years ago
parent
commit
605ec41b30
2 changed files with 6 additions and 2 deletions
  1. 4
    0
      manifests/apache.pp
  2. 2
    2
      templates/etherpadlite.vhost.erb

+ 4
- 0
manifests/apache.pp View File

@@ -58,6 +58,10 @@ class etherpad_lite::apache (
58 58
       notify  => Service['httpd'],
59 59
       require => File['/etc/apache2/conf-available/connection-tuning'],
60 60
     }
61
+
62
+    httpd_mod { 'proxy_wstunnel':
63
+      ensure => present,
64
+    }
61 65
   }
62 66
 
63 67
   file { $docroot:

+ 2
- 2
templates/etherpadlite.vhost.erb View File

@@ -74,8 +74,8 @@
74 74
           RewriteCond %{REQUEST_URI}  ^/socket.io            [NC]
75 75
           RewriteCond %{QUERY_STRING} transport=websocket    [NC]
76 76
           RewriteRule /(.*)           ws://localhost:9001/$1 [P,L]
77
-          ProxyPass        /socket.io http://localhost:9001 retry=0
78
-          ProxyPassReverse /socket.io http://localhost:9001
77
+          ProxyPass        /socket.io http://localhost:9001/socket.io retry=0
78
+          ProxyPassReverse /socket.io http://localhost:9001/socket.io
79 79
       </IfModule>
80 80
 
81 81
       ProxyPass  / http://localhost:9001/ retry=0

Loading…
Cancel
Save