1
我正在尝试使用Apache作为运行cometd的Jetty服务器的反向代理。mod_proxy_wstunnel在jetty上运行的cometd
我的设置是这样工作:
Apache(HTTPS) --> Jetty(HTTP)
这里是Apache的conf文件
<VirtualHost *:443>
ServerAdmin [email protected]
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>
在我使用cometd.js客户端。
但是我握手过程中获得客户端上此错误
Error during WebSocket handshake: Unexpected response code: 400
地址是wss://y.domain.com
后,客户端再次尝试与本站达 - 但我怕握手与长期投票...
我错过了什么? ProxyPass指令的
阿帕奇在码头面前的是一个已知的性能和容量瓶颈,你能解释一下为什么你觉得有必要使用设置? – 2014-08-27 11:42:33
好吧,我的应用程序使用4个不同的虚拟主机,它们运行在同一台服务器上。其中一些使用本地apache,一些使用apache作为反向代理。由于我希望所有的端口都使用带有443端口的SSL来运行,Apache/NGINX似乎是最好的选择。如果我以本地模式(使用端口443)运行Jetty,那么我必须移动到2台不同的机器,这是我想要的。 – Stimpy 2014-08-28 20:52:54