Deploy an app on my own server without the port number in the address

落爺英雄遲暮 提交于 2019-12-01 21:17:07

问题


I have set up my own server with R and shiny-server, and had already put some apps on that.

However, all apps have a port number like the :3838 in blahblah.com:3838/app_name, which doesn't look very nice, if my future plan is to build an entire site using shiny.

So if that is possible to change some configuration that I can remove the :3838 from the address?


回答1:


You need to change a setting in the Shiny Server config file (change the port it listens on). See below (assuming you are running Ubuntu):

Find the shiny server config file (available in /etc/shiny-server/shiny-server.conf). Find the line:

# Instruct this server to listen on port 3838
  listen 3838;

Change that to 80 (which is the default http port).

Then restart the shiny server service:

service shiny-server restart

All your apps will now be running through the :80 (or regular http port), which you don't need to mention when typing out the link.

NOTE: I'm not sure how this might affect other websites you might be hosting (I only run shiny/rstudio server on my box, so that wasn't something I needed to worry about).

For more information, see the shiny server documentation (Section 2.1 for your specific question)



来源:https://stackoverflow.com/questions/29973026/deploy-an-app-on-my-own-server-without-the-port-number-in-the-address

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!