2017-08-26 26 views
2

我在嘗試執行我認爲我會直截了當的問題時:使用託管在AWS EC2服務器中的同一應用替換託管在https://www.shinyapps.io/中的Shiny應用。在已發佈的帳簿中包含託管在私人服務器中的Shiny應用

我收到了(工作得很好,但跑出來的時間)爲:

```{r, echo = FALSE, screenshot.opts = list(delay = 15), dev = 'png', 
cache = TRUE, fig.align = 'center', out.width = '90%'} 
knitr::include_app('http://user.shinyapps.io/least-squares/', height = 
'900px') 
``` 

我是想:

```{r, echo = FALSE, screenshot.opts = list(delay = 15), dev = 'png', 
cache = TRUE, fig.align = 'center', out.width = '90%'} 
knitr::include_app('http://ec2-35-177-34-200.eu-west- 
2.compute.amazonaws.com:3838/least-squares/', height = '900px') 
``` 

你可以看到,確實是應用程序正在運行,因爲它應該在

http://ec2-35-177-34-200.eu-west-2.compute.amazonaws.com:3838/least-squares/ [編輯:現在禁用]

此外,叔他的第二部分代碼產生html文檔,該文檔在本地充分顯示應用程序(它們是從.Rmd文件生成的)。當這本書發佈到http://bookdown.org;那裏的應用程序不顯示,如果我使用第二塊代碼(與第一個很好)。

關於發生什麼事情的想法?

回答

2

您無法在通過HTTPS提供的網頁上使用HTTP資源。看到這篇文章的更多信息:Allow loading HTTP resources over HTTPS

您的應用程序託管在ShinyApps.io上,因爲它通過HTTPS提供服務。

+0

的確,這是問題所在。改爲HTTPS,一切都很好。非常感謝! – epsilone

相關問題