Forum: Ruby on Rails How to hide port number from URL?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
6c168ebad29f0105872ec771bbdac590?d=identicon&s=25 Charles (Guest)
on 2006-01-30 18:01
I just installed RoR on my server and I can access it using port 3000,
but it's not very nice to have it in the URL. How can I hide the port
from the URL?
Thanks,
54077fb03c95861af85880218cf7aef2?d=identicon&s=25 Gokhan Arli (sylow)
on 2006-01-30 18:04
Charles wrote:
> I just installed RoR on my server and I can access it using port 3000,
> but it's not very nice to have it in the URL. How can I hide the port
> from the URL?
> Thanks,

./script/server webrick --port 80


Gokhan Arli
Software developer
www.sylow.net
F15fdc7cb2e911b3808837f2be244add?d=identicon&s=25 Adam Denenberg (Guest)
on 2006-01-30 18:07
(Received via mailing list)
use FCGI and get rid of the webrick server altogether if that is an
option. If you use apache/lighttpd and fastcgi you are all on port 80
with no ugly port numbers

adam
6c168ebad29f0105872ec771bbdac590?d=identicon&s=25 Charles (Guest)
on 2006-01-30 18:53
> ./script/server webrick --port 80


Thanks. I already have Apache on port 80. How could I do?
119af50160cabfe1fb6f2f05f5018c64?d=identicon&s=25 James Ludlow (Guest)
on 2006-01-30 19:05
(Received via mailing list)
On 1/30/06, Charles <freakingcrazy@gmail.com> wrote:
> > ./script/server webrick --port 80
>
>
> Thanks. I already have Apache on port 80. How could I do?

You can only have one web server per port.  If you need to run
multiple applications through the same port, you should look into
Apache's virtual host directive.

-- James
6c168ebad29f0105872ec771bbdac590?d=identicon&s=25 Charles (Guest)
on 2006-01-30 19:20
Yes, is there a way to run RoR through Apache?
119af50160cabfe1fb6f2f05f5018c64?d=identicon&s=25 James Ludlow (Guest)
on 2006-01-30 19:35
(Received via mailing list)
On 1/30/06, Charles <freakingcrazy@gmail.com> wrote:
> Yes, is there a way to run RoR through Apache?

http://wiki.rubyonrails.org/rails/pages/HowtoSetup...
6578456ff00ab3520b1fe684bc572b45?d=identicon&s=25 Łukasz Piestrzeniewicz (Guest)
on 2006-01-30 19:38
(Received via mailing list)
On 30/01/06, Charles <freakingcrazy@gmail.com> wrote:
> > ./script/server webrick --port 80
>
> Thanks. I already have Apache on port 80. How could I do?

You have at least two options.

First would be to install fcgi support for Apache and run your
application from Apache itself. I use this setup for several Rails
applications on my own computer.

Second is to use Apache as a proxy redirecting all traffic to
lighttpd/webrick running on port 3000. This is preferred way of
working for example on Textdrive. (See mod_proxy documentation).

Another thing is that you probably do not want to configure Rails app
as the one and only for your Apache. If so you can install application
on it's own virtual host or as sublocation of your default host.

Virtual hosts are simple to setup but if your computer does not have
several DNS entries assigned applications will be visible only on from
your computer.

Everything depends on if you want your applications to be visible by
others in the network.
6c168ebad29f0105872ec771bbdac590?d=identicon&s=25 Charles (Guest)
on 2006-01-30 19:45
Thank you.
6c168ebad29f0105872ec771bbdac590?d=identicon&s=25 Charles (Guest)
on 2006-01-31 20:41
This topic is locked and can not be replied to.