Configuring Apache 2.4 mod_proxy_wstunnel for Socket.IO 1.0

Use Rewrite conditions to match for this special case: RewriteEngine On RewriteCond %{REQUEST_URI} ^/socket.io [NC] RewriteCond %{QUERY_STRING} transport=websocket [NC] RewriteRule /(.*) ws://localhost:8082/$1 [P,L] ProxyPass /socket.io http://localhost:8082/socket.io ProxyPassReverse /socket.io http://localhost:8082/socket.io NOTE As Mark W noted below. These must be entered at vhost level and not at server or .htaccess level. You can also reference a balancer: … Read more

Can a Reverse Proxy use SNI with SSL pass through?

This IS possible with Haproxy. You can setup a TCP proxy and extract the SNI and do routing based on the SNI. Here’s an example: backend be.app1 mode tcp no option checkcache no option httpclose tcp-request inspect-delay 5s tcp-request content accept if { req.ssl_hello_type 1 } tcp-request content reject use-server server1 if { req.ssl_sni -m … Read more

What is a Reverse Proxy?

A reverse proxy, also known as an “inbound” proxy is a server that receives requests from the Internet and forwards (proxies) them to a small set of servers, usually located on an internal network and not directly accessible from outside. It’s “reverse”, because a traditional (“outbound”) proxy receives requests from a small set of clients … Read more

What is a typical method to scale out a software load balancer?

Load balancers can’t easily be scaled by other load balancers since there will inherently be a single load balancer on the chain somewhere maintaining the connections. That said, balancers such as LVS or HAProxy have absurd capacity in the Gbps range. Once you get beyond the capabilities of a single load balancer (software, hardware, whatever), … Read more

Using Https between Apache Loadbalancer and backends

The problem turned out to be that the certificates common name did not match the server name. Prior to Apache 2.4.5 this check can be disabled using SSLProxyCheckPeerCN off but on higher versions (such as 2.4.7) SSLProxyCheckPeerName off also needs to be specified. Apache documentation for SSLProxyCheckPeerName The working configuration looks like this: SSLProxyEngine on … Read more