dropping the 3838 port from url

1,272 views
Skip to first unread message

Andrew Clark

unread,
Jan 31, 2014, 10:00:56 PM1/31/14
to shiny-...@googlegroups.com
Hi
  just trying to configure a web site on AWS

everthing is working smoothly at mywebsite.com:3838 but I would like to drop the :3838 from the url

section 2.1 it looks as though the default should go to this port (see below)

How do I go about rectifying this? 

ps new at this so do not know how to access and amend config files

cheers

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

Jeff Allen

unread,
Jan 31, 2014, 11:31:14 PM1/31/14
to shiny-...@googlegroups.com

Andrew Clark

unread,
Feb 1, 2014, 12:10:25 AM2/1/14
to shiny-...@googlegroups.com
Jeff
Thanks for swift reply

Looking at that guide, I find this
"By default, Shiny Server listens on port 3838, so your new application will be available at http://myserver.com:3838/01_hello where myserver is the hostname or IP address of the Shiny Server" Then it goes on to say how to change this port number

Currently I get the default situaton and the app is available. I want to divest myself of  the :3838 not use an alternative number

Also I am unable to use the  command to get at the config file viz
sudo cp /opt/shiny-server/config/default.config /etc/shiny-server/shiny-server.conf
 

as my opt directory has no folders within it

Owe Jessen

unread,
Feb 1, 2014, 8:49:17 AM2/1/14
to shiny-...@googlegroups.com
Well, the app needs a port to listen on, so you might change that port, but you cannot get rid of it. If you don't want to show the port to the world, and run the app as myserver.com or myserver.com/myapp, you need to redirect the webserver. When I set up my server, there was a part on this in the configuration tutorial, but I think it was in the rstudio-server documentation,

Anyway, what I did was putting

ProxyPass        /whiskyTastings/ http://localhost:3838/whiskyTastings/
ProxyPassReverse /whiskyTastings/ http://localhost:3838/whiskyTastings/
RedirectMatch permanent ^/whiskyTastings/$ /whiskyTastings/

into the virtual host part of the apache configuration.

Jeff Allen

unread,
Feb 1, 2014, 1:47:31 PM2/1/14
to Andrew Clark, shiny-...@googlegroups.com
Andrew,

Sorry for the confusion. So by default your browser tries to contact a server on port 80. So if you don't specify a port, that's what it will try.

Just set your server to listen on 80 and you should be able to access it either with or without a ":80" suffix.

But the lack of anything in /opt worries me. Were you able to install Shiny Server? If so, it definitely should exist in /opt/shiny-server/. Are you just running Shiny directly (with `runApp()` in R) rather than using Shiny Server?

Jeff

January 31, 2014 at 11:10 PM
Jeff
Thanks for swift reply

Looking at that guide, I find this
"By default, Shiny Server listens on port 3838, so your new application will be available at http://myserver.com:3838/01_hello where myserver is the hostname or IP address of the Shiny Server" Then it goes on to say how to change this port number

Currently I get the default situaton and the app is available. I want to divest myself of  the :3838 not use an alternative number

Also I am unable to use the  command to get at the config file viz
sudo cp /opt/shiny-server/config/default.config /etc/shiny-server/shiny-server.conf
 

as my opt directory has no folders within it

On Friday, 31 January 2014 20:31:14 UTC-8, Jeff Allen wrote:
--
You received this message because you are subscribed to a topic in the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/shiny-discuss/CHbcFjPv3Ck/unsubscribe.
To unsubscribe from this group and all its topics, send an email to shiny-discus...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
January 31, 2014 at 10:31 PM
This quick start guide might be helpful for you: http://rstudio.github.io/shiny-server/latest/#host-a-directory-of-applications-1

Jeff

On Friday, January 31, 2014 9:00:56 PM UTC-6, Andrew Clark wrote:
--
You received this message because you are subscribed to a topic in the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/shiny-discuss/CHbcFjPv3Ck/unsubscribe.
To unsubscribe from this group and all its topics, send an email to shiny-discus...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Dawg

unread,
Apr 7, 2014, 4:54:11 PM4/7/14
to shiny-...@googlegroups.com
Andrew,

did you get this to work? I'm still trying the same and have no luck (or ability to make the right changes) so far.

Did anybody else succeed doing this?

Thanks,
D.

Jeff Allen

unread,
Apr 7, 2014, 5:09:41 PM4/7/14
to shiny-...@googlegroups.com
Hi,

Did you check out the Quick Start Guide? http://rstudio.github.io/shiny-server/latest/#host-a-directory-of-applications-1 It walks through the process of changing the port.

Jeff
Message has been deleted

Dawg

unread,
Apr 7, 2014, 6:40:24 PM4/7/14
to shiny-...@googlegroups.com
Jeff,
thanks, I read through that a couple of times. I made a mistake describing my problem. I want my top level domain to be the Shiny application. I have problems doing that. Dropping the 3838 is therefore only half the problem. Somehow Apache already occupying port 80 throws things off. 
Thanks,
D.

Dawg

unread,
Apr 7, 2014, 6:58:16 PM4/7/14
to shiny-...@googlegroups.com
Hmmm, I slowly understand. I pointed Apache to a different port and can use port 80 for Shiny now. But I still can't use my top level domain name for the app directly.

Jeff Allen

unread,
Apr 7, 2014, 8:53:16 PM4/7/14
to shiny-...@googlegroups.com
Great! You're halfway there.

The other piece of the puzzle is the "hosting mode." Bu default, you're using site_dir which hosts a whole directory of applications. What you want is app_dir, which hosts a single application.

So you could use app_dir mode by doing something like:

location / {
   ...
   app_dir /srv/shiny-server/myapp;
}

That would host an individual application at the base URL.

Jeff

Dawg

unread,
Apr 7, 2014, 10:07:48 PM4/7/14
to shiny-...@googlegroups.com
That did it. Thanks a lot. 
Reply all
Reply to author
Forward
0 new messages