Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot log in to RStudio server after upgrading versions

I had RStudio Server v0.98.1103.

In my nginx config file, I added the following lines so that I can access it from /rstudio instead of :8787

location /rstudio/ {
  proxy_pass http://127.0.0.1:8787/;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "upgrade";
}

I just updated to v0.99.896. Now when I go to the /rstudio URL and put in my credentials, it just goes back to the same login screen. If I put it wrong credentials then I do see an error, but if the credentials are right then the page simply "refreshes".

If I go to :8787 then I'm able to login.

Does anyone have any ideas why I can't login anymore?

Edit: When I downgrade back to the previous version, I can log in again.

like image 671
DeanAttali Avatar asked Oct 31 '22 04:10

DeanAttali


1 Answers

There are a few things missing from your config file. See this article for details on how to configure an nginx proxy to use an /rstudio prefix: https://support.rstudio.com/hc/en-us/articles/200552326-Running-RStudio-Server-with-a-Proxy

This is what the complete config should look like:

http {

  map $http_upgrade $connection_upgrade {
      default upgrade;
      ''      close;
  }

  server {
    listen 80;


    location /rstudio/ {
      rewrite ^/rstudio/(.*)$ /$1 break;
      proxy_pass http://localhost:8787;
      proxy_redirect http://localhost:8787/ $scheme://$host/rstudio/;
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection $connection_upgrade;
      proxy_read_timeout 20d;
    }
  }
}
like image 172
JJ Allaire Avatar answered Nov 09 '22 05:11

JJ Allaire