Websocket 码头上运行Comet的mod_proxy_wstunel

Websocket 码头上运行Comet的mod_proxy_wstunel,websocket,jetty,mod-proxy,cometd,Websocket,Jetty,Mod Proxy,Cometd,我试图使用Apache作为运行Comed的Jetty服务器的反向代理 我的设置如下所示: Apache(HTTPS) --> Jetty(HTTP) 这是apacheconf文件 <VirtualHost *:443> ServerAdmin xxx@domain.com ServerName y.domain.com ProxyPass / http://localhost:8888/ ProxyPassRe

我试图使用Apache作为运行Comed的Jetty服务器的反向代理

我的设置如下所示:

Apache(HTTPS) --> Jetty(HTTP)
这是apacheconf文件

<VirtualHost *:443>
        ServerAdmin xxx@domain.com
        ServerName y.domain.com

        ProxyPass / http://localhost:8888/
        ProxyPassReverse / http://localhost:8888/

        ProxyPass /ws/  ws://localhost:8888/
        ProxyPass /wss/ wss://localhost:8888/

        ProxyRequests Off
        ProxyVia On
        Timeout 1500
        KeepAlive On
        MaxKeepAliveRequests 100
        KeepAliveTimeout 15

        <Proxy *>
                Order deny,allow
                Deny from all
                Allow from all
        </Proxy>

        SSLEngine On
        SSLCertificateFile /etc/apache2/ssl/localhost.crt
        SSLCertificateKeyFile /etc/apache2/ssl/localhost.key
        SSLCertificateChainFile /etc/apache2/ssl/ca.crt

        ErrorLog /var/log/apache2/error.log
        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
        ServerSignature On
</VirtualHost>
地址是
wss://y.domain.com

之后,客户端将再次尝试,站点已启动-但我担心握手时间过长


我遗漏了什么?

ProxyPass指令的排序很重要

按照配置顺序检查配置的ProxyPass和ProxyPassMatch规则。匹配的第一条规则获胜


Jetty前面的Apache是一个已知的性能和功能瓶颈,您能解释一下为什么需要使用安装程序吗?好的,我的应用程序使用4个不同的虚拟主机,它们运行在同一台服务器上。其中一些使用本地apache,一些使用apache作为反向代理。由于我希望它们都使用SSL和端口443运行,Apache/NGINX似乎是最好的选择。如果我在本机模式下运行Jetty(端口443),那么我必须移动到2台不同的机器,这是我要避免的。
Error during WebSocket handshake: Unexpected response code: 400