Can RStudio Server "serve" a file to the web?


#1

I’m running RStudio Server on an AWS EC2 instance. I have a script that runs on a schedule once a day and produces a png file. If I am logged in to RStudio Server my browser can see the file at
http:///files/directory_in_home/graphic_file.png
If I am not logged in, directing the browser to that address opens the log in dialog.

Is there a way to configure RStudio Server to show that file publicly?

I briefly tried installing apache2, but it wouldn’t start at all – I think because RStudio Server is running? I haven’t tested that out.
The script doesn’t need RStudio Server, just R, so I suppose I could work around by creating an R + web server server.


#2

While not a direct answer, you might find Yihui’s servr package useful:

https://cran.r-project.org/package=servr