2016-04-15 58 views
0

我安裝我的閃亮的服務器,它是工作的罰款與此目錄下的多個應用程序:主機在閃亮服務器的歸屬位置的應用程序

/SRV /閃亮的服務器/ APP1 /SRV /閃亮的服務器/ APP 2

我可以使用www.mydomain.com/app1來訪問我的應用程序。

但是,當我使用www.mydomain.com它顯示示例應用程序的默認閃亮的服務器應用程序。

我想要的是當我去www.mydomain.com我可以看到app1,我怎麼能做到這一點?

謝謝

回答

0

你:http://docs.rstudio.com/shiny-server/

修改/etc/shiny-server/shiny-server.conf

server { 
    ... 
    # Define the location '/specialApp' 
    location /specialApp { 
    # Run this location in 'app_dir' mode, which will host a single Shiny 
    # Application available at '/srv/shiny-server/myApp' 
    app_dir /srv/shiny-server/myApp 
    } 

    # Define the location '/otherApps' 
    location /otherApps { 
    # Run this location in 'site_dir' mode, which hosts the entire directory 
    # tree at '/srv/shiny-server/apps' 
    site_dir /srv/shiny-server/apps; 
    } 
... 
} 
0

至於對方的回答中提到,您可以編輯location結構的/etc/shiny-server/shiny-server.conf

移除或註釋掉site_dirdirectory_index行。保留log_dir行 - 您的第一個location構造中需要log_dir。將app_dir行添加到您的應用的路徑。

這工作與示例應用程序:

1)從/srv/shiny-server/

2取下index.html文件)編輯的/etc/shiny-server/shiny-server.conflocation部分看起來像這樣:

location/{ 
    # Host app at base directory 
    app_dir /srv/shiny-server/sample-apps/hello; 

    # Log all Shiny output to files in this directory 
    log_dir /var/log/shiny-server; 
    } 
} 
相關問題