I recently implemented WebSockets on an Ubuntu Apache web-server having WebMin and configured with http-2 and here are my notes:
STEPS FOR WEBSOCKETS: install the lucee websocket plugin /lucee/admin/server.cfm?action=ext.applications … then download the file servlet-filter-utils-1.1.1.jar from Releases · isapir/lucee-websocket · GitHub and put it in the {tomcat}/lib directory of the lucee install … next you need to activate the ws:// and wss:// protocols in apache: sudo a2enmod proxy_wstunnel … then add to the {tomcat}/conf/web.xml file:
<!-- Required for the Lucee WebSocket Extension !-->
<filter>
<filter-name>HttpSessionInitializerFilter</filter-name>
<filter-class>net.twentyonesolutions.servlet.filter.HttpSessionInitializerFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>HttpSessionInitializerFilter</filter-name>
<!-- modify url-pattern to match your websocket endpoints !-->
<url-pattern>/ws/*</url-pattern>
</filter-mapping>
… next add to the apache2 global config Webmin > Servers > Apache Webserver > Global configuration > Edit Config Files :
**ref Only**:<IfModule mod_proxy.c>
**ref Only**:ProxyPreserveHost On
**add this**:ProxyPassMatch ^/ws/(.*)$ ws://127.0.0.1:8888/ws/$1
**Other Stuff Here ... **
**ref Only**:ProxyPassReverse / http://127.0.0.1:8888/
**ref Only**:</IfModule>
…
Finally add websocks to the log settings: /lucee/admin/server.cfm?action=server.logging {ame:“websocket”,appender:“Resource”,layout:“classic”,level:“debug”}