1

我在 R 中制作了一个闪亮的应用程序,并使用闪亮服务器在网络上托管它。假设我的应用程序托管在www.test.in(例如)。现在我想添加一个简单的静态 HTML 页面,其中将包含应用程序的链接,因此当用户访问 URL www.test.in时,他将看到 HTML 页面,而 www.test.in/app将包含闪亮的应用程序。

提前致谢。

4

1 回答 1

1

您可以在中添加以下index.html文件/srv/shiny-server

index.html

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Refresh" content="0; url=//www.test.in:port/app/" />
  </head>
  <body>
    <p>Redirecting to <a href="//www.test.in:port/app/">app</a>.</p>
  </body>
</html> 

whereport应设置为正确的值,例如 3838。
Shiny Server 将打开此索引并重定向到应用程序。

于 2020-09-03T11:57:51.293 回答