From 572de5f7d438c93cc7bc14b0c77bebea3998bb60 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Sun, 16 Nov 2025 00:12:44 +0100 Subject: [PATCH] Update Apache configuration to include alternative WebSocket handling for Apache 2.4.47 This commit adds comments to the Apache configuration file, highlighting that mod_proxy_http can directly handle WebSockets starting from Apache 2.4.47. It provides an alternative ProxyPass configuration for WebSocket connections, ensuring better compatibility and guidance for users facing issues with the existing RewriteRule setup. --- apache.conf.example | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apache.conf.example b/apache.conf.example index 539937e..6309754 100644 --- a/apache.conf.example +++ b/apache.conf.example @@ -34,6 +34,9 @@ # WICHTIG: Diese LocationMatch muss VOR den anderen ProxyPass-Direktiven stehen # WICHTIG: mod_proxy_wstunnel muss aktiviert sein (sudo a2enmod proxy_wstunnel) # WICHTIG: mod_rewrite muss aktiviert sein (sudo a2enmod rewrite) + # + # HINWEIS: Seit Apache 2.4.47 kann mod_proxy_http WebSockets direkt verarbeiten. + # Falls die RewriteRule nicht funktioniert, verwende die alternative Konfiguration unten. # WebSocket-Upgrade erkennen und weiterleiten (wss:// -> ws://) # Verwende RewriteRule, um WebSocket-Upgrades zu erkennen und weiterzuleiten @@ -56,6 +59,14 @@ + # ALTERNATIVE: Direkte ProxyPass-Konfiguration (funktioniert ab Apache 2.4.47) + # Falls die RewriteRule nicht funktioniert, kommentiere die obige LocationMatch aus + # und verwende stattdessen diese Konfiguration: + # ProxyPass /socket.io/ ws://localhost:3050/socket.io/ + # ProxyPassReverse /socket.io/ ws://localhost:3050/socket.io/ + # ProxyPass /socket.io/ http://localhost:3050/socket.io/ + # ProxyPassReverse /socket.io/ http://localhost:3050/socket.io/ + # Timeout für alle Proxy-Verbindungen (außerhalb von LocationMatch) ProxyTimeout 3600