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...
受Visual Studio Code启发的RStudio主题。 先决条件 RStudio 1.2.x或更高版本。 安装 获取包装: remotes :: install_github( " anthonynorth/rscodeio " ) rscodeio修改了RStudio菜单的主题。 当前主题API并未...
在本课程中,"dataviz:Kieran Healy的rstudio :: conf 2020数据可视化研讨会",Kieran Healy博士分享了他在数据可视化领域的深入见解和实践经验,特别是利用R语言和ggplot2包进行高效的数据可视化。这个研讨会的...
在“dl-keras-tf:rstudio :: conf(2020)深度学习研讨会”中,我们聚焦于使用R语言结合Keras和TensorFlow进行深度学习实践的议题。这个研讨会可能涵盖了多个方面,旨在帮助参会者提升在数据科学领域的技能,特别是...
Rstudio Server 不同R版本配置和切换_rstudio换r版本-CSDN博客 (2024_2_15 23_19_59).html
渐变Rstudio 用于纸空间的Rstudio Server的dockerfile映像
ansible-rstudio-server:在类似Debian的系统中设置RStudio服务器(最新版本)的Ansible角色
rstudio-conf-2020-lighting-talk 在rstudio :: conf 2020上的闪电演讲中,两个整洁的整洁度功能使计算指标(和生活)更加有趣 在软件包中展示了两个很酷的功能,这些功能使整洁地计算指标变得轻而易举! 为了重现...
Rstudio Server + Docker + tensorflowR - 云端使用R语言与GPU深度学习
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提供开源和商业版本,并且可以在台式机(Windows,Mac和Linux)上运行,也可以在连接到RStudio Server或RStudio Server Pro的浏览器(Debian / Ubuntu,Red Hat / CentOS和SUSE Linux)中运行。 本地访问...
1. **下载RStudio Server的RPM包**:访问RStudio官网(https://www.rstudio.com/products/rstudio/download-server/)下载适用于Linux系统的RStudio Server的RPM安装包,例如`rstudio-server-0.97.551-x86_64.rpm`。...
懒人-openr-rstudio 一个懒人在 AWS 上安装了 Revolution R Open 和 Rstudio Server ====================== 在以下位置阅读有关此内容的信息:
RStudio是一款广受欢迎的开源集成开发环境(IDE),专门用于编写和执行R语言代码。它提供了许多方便的功能,包括代码编辑、调试、项目管理、版本控制集成以及与各种数据源的交互。在这个“RStudio-1.4.1103.zip”...
{golem} {golem}是用于构建生产级闪亮应用程序的自以为是的框架。 工具系列 ...rstudio :: conf(2020):使用golem的 视频 用户! 2019: :France: rstudio :: conf(2020):使用golem的 备忘单 安装
RStudio是一款功能强大的开源集成开发环境(IDE),专为R编程语言设计。它提供了一个集中的界面,使得数据科学家和统计学者可以更高效地编写、测试和执行R代码。RStudio的主要特点包括代码编辑器、项目管理、调试...
批量连接-OSC RStudio服务器 专为OSC OnDemand设计的交互式应用程序,可在Owens批处理作业中启动RStudio服务器。先决条件此Batch Connect应用程序要求在要在其上运行批处理作业的计算节点上(而不是OnDemand节点)...
【标题】:“rstudio-conf: Rstudio的材料” 在R语言的世界中,Rstudio Conf是一个备受瞩目的年度会议,聚集了全球各地的数据科学家、统计学家和R语言爱好者,共同探讨和分享R语言在数据分析、可视化、软件开发以及...
**标题**:“Getting Started with RStudio” **描述**:Rstudio是学习R语言的得力助手,必备良药! **标签**:“R语言 Rstudio” #### 二、了解RStudio **RStudio**是一款非常强大的集成开发环境(Integrated ...