Shiny Server App IP and Name Question

641 views
Skip to first unread message

Jason Watts

unread,
Dec 28, 2015, 10:06:47 AM12/28/15
to Shiny - Web Framework for R

When somebody enters the IP for an app it displays a numeric IP, I want it say something. Like ap.com or myapp.io, etc. I see the server name configuration option in the administration guide, but I can’t get it to display the name when I type the actual app IP. Is this possible.

I realize you can buy a domain name and redirect it to the app but when you are redirected the numerical IP is what is displayed not the redirected domain name. How do I get it to display the redirected name when I’m looking at the app.

Joe Cheng

unread,
Dec 28, 2015, 3:38:23 PM12/28/15
to Jason Watts, Shiny - Web Framework for R
If you're visiting a server via IP, you can't just change the URL bar to display something else, not unless you actually redirect the browser to make a new request using the name instead of the IP. If you could just change the URL bar, then bad guys could trick you into visiting 1.2.3.4 and then change the URL bar to "bankofamerica.com".

You need to buy a domain name and not redirect it to the app, but actually configure the DNS server for that domain to point to the server IP address. This is called an "A record" and your domain host should have instructions for how to configure one.

For example:

On Mon, Dec 28, 2015 at 7:06 AM Jason Watts <jhwat...@gmail.com> wrote:

When somebody enters the IP for an app it displays a numeric IP, I want it say something. Like ap.com or myapp.io, etc. I see the server name configuration option in the administration guide, but I can’t get it to display the name when I type the actual app IP. Is this possible.

I realize you can buy a domain name and redirect it to the app but when you are redirected the numerical IP is what is displayed not the redirected domain name. How do I get it to display the redirected name when I’m looking at the app.

--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/c3f2efba-1497-4de1-842a-3219f34a610b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jason Watts

unread,
Jan 2, 2016, 8:51:10 AM1/2/16
to Shiny - Web Framework for R

This worked for me, but what if I have two apps and I want to give each a separate .com address. When I set up the DNS server it only allows me the numerical IP and not add a subfolder. I have several different domain names that I have purchased and would like to use for multiple apps on the same server.

Joe Cheng

unread,
Jan 2, 2016, 12:28:26 PM1/2/16
to Jason Watts, Shiny - Web Framework for R
Point all the domain names to the same IP address. Then in your shiny server config, you will set up multiple server{} blocks, one per domain. They will each still have the same "listen" directive value, as they'll all be sharing the same port. Finally, set the domain for each server block using server_name.

server {
listen 80;
server_name foo.com;

location / {
app_dir /srv/shiny-server/foo;
}
}

server {
listen 80;
server_name bar.com;

location / {
app_dir /srv/shiny-server/bar;
}
}
--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages