Overview
If you are running RStudio on a public network it is strongly recommended that you deploy RStudio behind another web server (e.g. Nginx or Apache) which acts as a reverse proxy to it. Doing this allows you to benefit from the the robust HTTP protocol handling built into the web server. This has both performance (e.g. keep-alive) and security (e.g. rejection of maliciously malformed requests) benefits.
Nginx Configuration
On Debian or Ubuntu a version of Nginx that supports reverse-proxying can be installed using the following command:
sudo apt-get install nginx
To enable an instance of Nginx running on the same server to act as a front-end proxy to RStudio you would add commands like the following to your nginx.conf
file:
http {
server {
listen 80;
location / {
proxy_pass http://localhost:8787;
proxy_redirect http://localhost:8787/ $scheme://$host/;
}
}
}
If you want to serve RStudio from a custom path (e.g. /rstudio) you would edit your nginx.conf
file as shown below:
location /rstudio/ {
rewrite ^/rstudio/(.*)$ /$1 break;
proxy_pass http://localhost:8787;
proxy_redirect http://localhost:8787/ $scheme://$host/rstudio/;
}
After adding these entries you'll then need to restart Nginx so that the proxy settings take effect:
sudo /etc/init.d/nginx restart
Apache Configuration
To enable an instance of Apache running on the same server to act as a front-end proxy to RStudio you need to use the mod_proxy
. The steps for enabling this module vary across operating systems so you should consult your distribution's Apache documentation for details.
On Debian and Ubuntu systems Apache can be installed with mod_proxy
using the following commands:
sudo apt-get install apache2
sudo apt-get install libapache2-mod-proxy-html
sudo apt-get install libxml2-dev
Then, to update the Apache configuration files to activate mod_proxy
you execute the following commands:
sudo a2enmod proxy
sudo a2enmod proxy_http
Once you have enabled mod_proxy
in your Apache installation you need to add the required proxy commands to your VirtualHost
definition. For example:
<VirtualHost *:80>
<Proxy *>
Allow from localhost
</Proxy>
ProxyPass / http://localhost:8787/
ProxyPassReverse / http://localhost:8787/
</VirtualHost>
Note that if you want to serve RStudio from a custom path (e.g. /rstudio) you would replace the ProxyPass directives described above to:
ProxyPass /rstudio/ http://localhost:8787/
ProxyPassReverse /rstudio/ http://localhost:8787/
RedirectMatch permanent ^/rstudio$ /rstudio/
Finally, after you've completed all of the above steps you'll then need to restart Apache so that the proxy settings take effect:
sudo /etc/init.d/apache2 restart
RStudio Configuration
Once you are successfully proxying requests from Nginx or Apache to RStudio you should change the port RStudio listens on from 0.0.0.0 (all remote clients) to 127.0.0.1 (only the localhost). This ensures that the only way to connect to RStudio is through the proxy server. You can do this by adding the www-address
entry to the /etc/rstudio/rserver.conf
file as follows:
www-address=127.0.0.1
Note that this config file does not exist by default so you may need to create it if it doesn't already exist.
相关推荐
通过rstudio :: global(2021)计划在线创建日历文件的材料rstudio-global-2021-calendar通过在线刮擦rstudio :: global(2021)计划创建日历文件的材料请随时进行改进和转发! 非常感谢...凯尔西·冈萨雷斯(Kelsey...
dl-keras-tf:rstudio :: conf(2020)深度学习研讨会
受Visual Studio Code启发的RStudio主题。 先决条件 RStudio 1.2.x或更高版本。 安装 获取包装: remotes :: install_github( " anthonynorth/rscodeio " ) rscodeio修改了RStudio菜单的主题。 当前主题API并未...
dataviz:Kieran Healy的rstudio :: conf 2020数据可视化研讨会的课程材料
渐变Rstudio 用于纸空间的Rstudio Server的dockerfile映像
ansible-rstudio-server:在类似Debian的系统中设置RStudio服务器(最新版本)的Ansible角色
rstudio:源于:rstudio
rstudio-conf-2020-lighting-talk 在rstudio :: conf 2020上的闪电演讲中,两个整洁的整洁度功能使计算指标(和生活)更加有趣 在软件包中展示了两个很酷的功能,这些功能使整洁地计算指标变得轻而易举! 为了重现...
Rstudio Server + Docker + tensorflowR - 云端使用R语言与GPU深度学习
You’ll come away with a toolkit of strategies for analyzing and visualizing data of all sorts using R and RStudio. Spreadsheets are powerful tools for many tasks, but if you need to interpret, ...
not come with the RStudio IDE. R is a statistical programming language and we need this language to use RStudio. Git is a popular version control system that will be integrated into RStudio. ...
的rstudio-conf 这是我们将存储rstudio :: conf的所有材料的地方!
Rstudio Server 不同R版本配置和切换_rstudio换r版本-CSDN博客 (2024_2_15 23_19_59).html
Rstudio简介:所有窗口均绑定在屏幕上,以标签页的方式进行展示;既有客户端也有服务器版本。 常用操作: 1、help(函数名):R可视化开发界面:Rcmdr(函数包)、Rkward(Prefer Linux)、R Productivity Environment...
懒人-openr-rstudio 一个懒人在 AWS 上安装了 Revolution R Open 和 Rstudio Server ====================== 在以下位置阅读有关此内容的信息:
{golem} {golem}是用于构建生产级闪亮应用程序的自以为是的框架。 工具系列 ...rstudio :: conf(2020):使用golem的 视频 用户! 2019: :France: rstudio :: conf(2020):使用golem的 备忘单 安装
批量连接-OSC RStudio服务器 专为OSC OnDemand设计的交互式应用程序,可在Owens批处理作业中启动RStudio服务器。先决条件此Batch Connect应用程序要求在要在其上运行批处理作业的计算节点上(而不是OnDemand节点)...
Rstudio中用于Omics Notebook的Docker容器 1.克隆仓库并构建docker容器 更改项目名称 ...docker build -t 'rstudio_on' . 或从Docker集线器中拉出。 docker pull bblum/omics_notebook_... -v ${PWD}:/home/rstudio:rw \
除了提供主要功能的python软件包外,JupyterLab扩展名( @jupyterlab/server-proxy )在JupyterLab启动器窗口中还提供了一些按钮,例如RStudio。 注意:该项目以前称为nbserverproxy 。 由于nbserverproxy是...
使用Shiny进行深入数据发现 芭芭拉·博尔赫斯·里贝罗 人们通常认为数据科学是从数据中建立起来的。 但是也有很多情况下,去其他远离身边,然后向下钻取到数据,也可以是非常有用的。 您是否见过某个情节似乎有些...