@dedrick
To proxy WebSocket Secure (wss) connections to WebSocket (ws) using .htaccess, you can use the following rules:
1 2 |
LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so |
1 2 3 4 |
RewriteEngine On RewriteCond %{HTTP:Connection} Upgrade [NC] RewriteCond %{HTTP:Upgrade} websocket [NC] RewriteRule ^(.*)$ ws://<your_target_server>/$1 [P,L] |
Replace "<your_target_server>" with the actual target WebSocket server address.
With these rules in place, incoming wss requests will be proxied to ws, allowing your WebSocket server to handle secure connections.