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

前端 未结 1 1956
北海茫月
北海茫月 2021-01-19 06:35

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

相关标签:
1条回答
  • 2021-01-19 07:00

    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)

    0 讨论(0)
提交回复
热议问题