Update WebSocket and API configurations in yourpart-websocket-fixed.conf and daemonServer.js

- Adjusted WebSocket proxy settings in yourpart-websocket-fixed.conf to route traffic through port 4551 for both secure and non-secure connections.
- Enhanced daemonServer.js to listen on all interfaces (0.0.0.0) for both TLS and non-TLS WebSocket connections, improving accessibility.
This commit is contained in:
Torsten Schulz (local)
2026-01-14 13:10:33 +01:00
parent 0cc280ed55
commit 9e845843d8
5 changed files with 62 additions and 39 deletions

View File

@@ -24,10 +24,10 @@
RequestHeader set X-Forwarded-Proto "https"
AllowEncodedSlashes NoDecode
# www Redirect (muss zuerst kommen, aber nicht für Proxy-Pfade)
# www Redirect (muss zuerst kommen, aber nicht für API-Pfade)
RewriteEngine on
RewriteCond %{SERVER_NAME} =your-part.de
RewriteCond %{REQUEST_URI} !^/(api|socket\.io|ws)/
RewriteCond %{REQUEST_URI} !^/api/
RewriteRule ^ https://www.%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
# API-Requests an Backend weiterleiten (Location-Block hat höhere Priorität)
@@ -35,19 +35,6 @@
ProxyPass "http://localhost:2020/api/"
ProxyPassReverse "http://localhost:2020/api/"
</Location>
# Socket.io: WebSocket und HTTP mit Location-Block
<LocationMatch "^/socket.io/">
# WebSocket-Upgrade
RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule .* "ws://localhost:2020%{REQUEST_URI}" [P,L]
# HTTP-Fallback für Polling
ProxyPass "http://localhost:2020/socket.io/"
ProxyPassReverse "http://localhost:2020/socket.io/"
</LocationMatch>
ErrorLog /var/log/apache2/yourpart.error.log
CustomLog /var/log/apache2/yourpart.access.log combined