I’m looking to host a few Shiny Apps on a Digital Ocean droplet with a custom domain through Google domains (let’s say: dataiscool.net). I’ve followed the directions here to set up the droplet and get shiny server installed: https://deanattali.com/2015/05/09/setup-rstudio-shiny-server-digital-ocean/
Shiny Server server is set up and server blocks are cleaned up so that the port :3838 is replaced with /shiny/. That works great.
I’ve setup my registrar to point to Digital Ocean nameservers as written here: https://www.digitalocean.com/community/tutorials/how-to-point-to-digitalocean-nameservers-from-common-domain-registrars
and setup the DNS side of things on Digital Ocean as written here: https://www.digitalocean.com/docs/networking/dns/how-to/add-domains/
I’m able to access my Shiny App at the IP (e.g., 64.238.119.95/shiny/app) but I cannot access it (404 error) at the custom domain (e.g., dataiscool.net/shiny/app)
I’m a fledgling with nginx, webservers, and the like but I cannot begin to troubleshoot where I might be going wrong – whether it’s the Shiny server, nginx, DNS side of things.
2
Answers
I figured it out and thought I would share with other folks who might have the same problem. This was all configuration issues with nginx. When you install and load nginx, you get a default config file in /etc/nginx/sites-enabled/default - you need to unlink or delete this! That way the proxypass pattern that many tutorials will work:
The fact that you can access the resource using the IP address, but not when you use the domain name, suggests it’s a DNS issue. Difficult to say beyond that based on the info (other than you should ensure that you have an A record pointing to your IP address).
Playing around with the command line tool "dig" (Linux or Mac) or "nslookup" (Windows) might help you verify whether the DNS settings are correct.
You can also use https://dnslytics.com/ to verify your DNS settings.