简体   繁体   English

升级版本后无法登录RStudio服务器

[英]Cannot log in to RStudio server after upgrading versions

I had RStudio Server v0.98.1103. 我有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 在我的nginx配置文件中,我添加了以下行,以便我可以从/rstudio而不是: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. 我刚刚更新到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. 现在,当我转到/rstudio URL并输入我的凭据时,它只会返回到相同的登录屏幕。 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. 如果我去:8787那么我就可以登录了。

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. 编辑:当我降级回以前的版本时,我可以再次登录。

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 有关如何配置nginx代理以使用/ rstudio前缀的详细信息,请参阅此文章: 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;
    }
  }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM