【发布时间】:2019-10-24 02:51:34
【问题描述】:
ttyd 是一个很好的基于网络的终端:
https://github.com/tsl0922/ttyd
默认使用7681端口,所以配置成功后可以在浏览器中从localhost:7681访问终端。
我们在端口 80 上有由 Apache 提供支持的 Web 服务器,并且只有这个端口对 Internet 开放。所以为了访问ttyd,我想设置一个代理转发localhost/shell到localhost:7681,我在httpd.conf中设置如下:
<VirtualHost *:80>
ProxyPass /shell http://127.0.0.1:7681/
ProxyPassReverse /shell http://127.0.0.1:7681/
</VirtualHost>
当我访问localhost/shell 时,它向我显示了带有“连接已关闭”消息的 ttyd 页面。似乎连接不成立。如何解决这个问题?
【问题讨论】:
-
我试过 Gotty github.com/yudai/gotty ,同样的问题存在。
标签: apache reverse-proxy portforwarding tty