Websockets on Apache over SSL layers

i was able to piece together a working solution to using WebSockets over ssl layers by looking at this example and doing this:


RewriteRule ^newPage/ https://mydomain.com:8010/[P,QSA,L]
RewriteRule ^socket.io/https://mydommain.com:8010/socket.io/ [P,QSA,L]

LoadModule proxy_module /usr/lib64/httpd//modules/mod_proxy.so
LoadModule proxy_http_module /usr/lib64/httpd//modules/mod_proxy_http.so
LoadModule headers_module /usr/lib64/httpd//modules/mod_headers.so
LoadModule deflate_module /usr/lib64/httpd//modules/mod_deflate.so

ProxyVia On

ProxyRequests Off
ProxyPreserveHost on

<Location /socket.io>

RewriteEngine On
RewriteCond %{QUERY_STRING} transport=websocket [NC]
RewriteRule /(.*) wss://mydomain.com:8010/socket.io/$1[P,L]
ProxyPass https://mydomain.com:8010/socket.io retry=0 timeout=30
ProxyPassReverse https://mydomain.com:8010/socket.io

however, the apacheLounge forum suggested this instead:

ProtocolsHonorOrder On Protocols h2c h2 http/1.1 H2Direct On

i am not sure how to do this. i did find this forum with a bit more information.

hopefully, i can install just using yum, or perhaps rpm. this instruction page:


seemed promising but the last rpm line # rpm -Uvh epel-release*rpm; gives me:

error: File not found by glob: epel-release*rpm

any suggestions on how to implement this on Centos 7? or is my original script adequate.

EDIT: i learned that ProtocolsHonorOrder is only available in Apache/2.4.17. are my changes to [dot]httpd the best option? it does seem to be working fine.