【发布时间】:2016-08-19 13:18:34
【问题描述】:
我正在使用 Apache 2.4、Ubuntu 14.04 背后的闪亮服务器(最新版本,1.4.2.786)。
按照在线文档 (https://support.rstudio.com/hc/en-us/articles/213733868-Running-Shiny-Server-with-a-Proxy) 的说明,我可以为 Web 套接字正确设置代理。但是,我想直接将我的 URL 指向一个闪亮的应用程序(不是所有应用程序)。
这是我当前的配置:
ProxyPreserveHost On
ProxyPassMatch "^/(.+)/websocket" "ws://localhost:3838/$1/websocket"
ProxyPass "/" "http://localhost:3838/users/username/appname/"
ProxyPassReverse "/" "http://localhost:3838/users/username/appname/"
ProxyRequests Off
使用此配置,我仍然收到错误消息:
WebSocket connection to
'wss://my-url/__sockjs__/
n=WxwgyafTMc2bWeH5eR/787/mx9zqt68/websocket'
failed: Error during WebSocket handshake:
Unexpected response code: 500
我猜这是由socket的代理配置引起的。感谢您提供任何修复它的建议。
【问题讨论】:
标签: r apache proxy websocket shiny-server