【问题标题】:Configuring nginx proxy for rstudio to work through ssh tunnel为 rstudio 配置 nginx 代理以通过 ssh 隧道工作
【发布时间】:2016-10-23 22:52:01
【问题描述】:

我们将 rstudio 安装在一个 docker 容器中并按照以下方式进行配置

https://support.rstudio.com/hc/en-us/articles/200552326-Running-RStudio-Server-with-a-Proxy

为了使用子 uri:example.com/rstudio。这是一种工作情况,服务器example.com 位于防火墙后面。要访问墙后的网站,我通常会像

ssh -L 8000:example.com:80 other_server

当我为example.com 执行此操作时,我可以加载像example.com/test.html 这样的页面。但是,当我尝试localhost:8000/rstudio 时,它会将我映射回example.com/rstudio

我可以在链接文档页面的配置中添加什么东西,让事情通过隧道工作吗?

【问题讨论】:

    标签: nginx proxy tunnel ssh-tunnel rstudio-server


    【解决方案1】:

    我可以建议你快速而肮脏的 hack:

    1. 在本地 PC 上添加 example.com = 127.0.0.1
    2. ssh -L 8000:remote_server_ip:80 other_server
    3. 试试去http://example.com/rstudio

    我认为这可能是由您的 rstudio 实例的 mod_rewrite 引起的

    查看here 了解更多 SSH 隧道示例,也许它也会有所帮助。

    【讨论】:

    • 您能解释一下在您的本地 PC 上添加 example.com = 127.0.0.1 是什么意思吗?添加什么?
    • 将其添加到您的本地主机文件中,对不起
    猜你喜欢
    • 2013-11-17
    • 2020-06-17
    • 2017-04-15
    • 2018-01-18
    • 1970-01-01
    • 2021-11-30
    • 2015-08-26
    • 2021-03-07
    • 2016-09-09
    相关资源
    最近更新 更多