如何在Ubuntu上配置通过NGINX运行的闪亮服务器?

时间:2017-02-18 14:02:58

标签: nginx shiny shiny-server nginx-location

我正在尝试配置NGINX服务器,以便通过NGINX运行闪亮的服务器和闪亮的应用程序,并提供适当的密码保护。我的NGINX默认文件显示在下面的示例中:

fmt_sbx

当我转到localhost:80时,会显示闪亮的欢迎页面,但两个应用程序"你好"和" rmd"没有运行(见下面的截图)。enter image description here

没有人知道我在这里做错了什么吗?

帮助将受到高度赞赏。

卡斯帕

2 个答案:

答案 0 :(得分:0)

以下是nginx“sites-available”中的默认文件应该是什么样子。还记得配置R闪亮服务器文件。

server {
    listen 80;

    location / {
        proxy_pass http://127.0.0.1:8080/;
            proxy_redirect http://127.0.0.1:8080/ $scheme://$host/;
            auth_basic "Username and Password are required"; 
            auth_basic_user_file /etc/nginx/.htpasswd;
    }
}

答案 1 :(得分:0)

您还需要在nginx的配置文件中添加应用的位置,例如:

location /hello {
    proxy_bind 127.0.0.1;
    proxy_pass http://localhost:8080/hello;
}