Ich versuche websockets mit httpd proxy und reverse proxy zu konfigurieren, aber es scheint nicht zu funktionieren. Wenn ich direkt den Tomcat-Server verwende, ist alles in Ordnung, wenn ich es über Apache httpd anrufe, ist der Antwortstatus . Das bedeutet, Apache httpd kann die Websocket-Anfrage nicht interpretieren und das Protokoll umschalten, oder?Konfiguriere gesicherte websockets mit Apache httpd 2.4.6 und Tomcat 8
Das ist meine httpd Config für meine App:
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
Listen 443 https
SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog
SSLSessionCache shmcb:/run/httpd/sslcache(512000)
SSLSessionCacheTimeout 300
SSLRandomSeed startup file:/dev/urandom 256
SSLRandomSeed connect builtin
SSLCryptoDevice builtin
<VirtualHost 10.224.130.50:80>
ServerName myhost
Redirect permanent/https://myhost/
</VirtualHost>
<VirtualHost 10.224.130.50:443>
ServerName myhost
ErrorLog logs/myhost.error.log
CustomLog logs/myhost.access.log common
ProxyPass /ws/ wss://localhost:8443/ws/ retry=0
ProxyPassReverse /ws/ wss://localhost:8443/ws/ retry=0
ProxyPass/https://myhost:8443/ connectiontimeout=600 timeout=1200
ProxyPassReverse/https://myhost:8443/
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLProxyEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
SSLCertificateFile "/etc/pki/tls/certs/myhost.cer"
SSLCertificateKeyFile "/etc/pki/tls/private/myhost.key"
</VirtualHost>
Und dies ist der Connector-Konfiguration für Apache Tomcat:
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="/root/.keystore"
keystorePass="password" />
Sorry, habe ich versucht, mit und ohne Schrägstriche ... immer noch nicht funktioniert ... Ich habe versucht, die Dokumentation zu folgen, aber es kommt nichts heraus .. Das Problem ist, weil ich manchmal Fehler 200 bekomme, dies bedeutet httpd tut die Umleitung aber nicht in einer richtigen Weise, oder? – spauny
Können Sie mir die Anforderungs- und Antwortheader anzeigen? –