Tam Kbe
2008-Aug-15 21:18 UTC
[Mongrel] Cant access ROR site externally using mongrel on shared host
Hi, I have been trying to deploy my Ruby on Rails site using Mongrel on Shared host. Mongrel seems to start fine using the command below: cd /home/linkamed/public_html/mysite mongrel_rails start -p 12003 -l /home/linkamed/public_html/mysite/log/mongrel.log -c /home/linkamed/public_html/mysite/ -e production -d and If I type something like this on the server: curl http://localhost:12003/users I get an HTML code output that resembles what should be displayed which means that Mongrel is working fine. I just couldn''t figure out how to access it externally!! I tried www.mysite.com:12003/users - www.mysite.com/12003/users - www.mysite.com/mysite/users Is there a rule or configuration I have to do for this to work? Thanks in Advance, Tam -- Posted via http://www.ruby-forum.com/.
Elijah Wright
2008-Aug-15 21:30 UTC
[Mongrel] Cant access ROR site externally using mongrel on shared host
odds are that you need to tell mongrel to listen on 0.0.0.0 rather than 127.0.0.1 ..... (the latter being a really common config for mongrels that are frontended by something else............) --elijah On Fri, Aug 15, 2008 at 5:18 PM, Tam Kbe <lists at ruby-forum.com> wrote:> Hi, > > I have been trying to deploy my Ruby on Rails site using Mongrel on > Shared host. Mongrel seems to start fine using the command below: > > cd /home/linkamed/public_html/mysite > > mongrel_rails start -p 12003 -l > /home/linkamed/public_html/mysite/log/mongrel.log -c > /home/linkamed/public_html/mysite/ -e production -d > > and If I type something like this on the server: > > curl http://localhost:12003/users > > I get an HTML code output that resembles what should be displayed which > means that Mongrel is working fine. > > I just couldn''t figure out how to access it externally!! > > I tried www.mysite.com:12003/users - www.mysite.com/12003/users - > www.mysite.com/mysite/users > > Is there a rule or configuration I have to do for this to work? > > Thanks in Advance, > > Tam > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/mongrel-users/attachments/20080815/4be49a9c/attachment.html>
Tam Kbe
2008-Aug-15 22:17 UTC
[Mongrel] Cant access ROR site externally using mongrel on shared host
Thanks Elijah for answer. I thought that might be the problem but Mongrel will actually start at port 0.0.0.0 unless you expliciatly tell it to start on 127.0.0.1. Here is output of Mongrel. ** Starting Mongrel listening at 0.0.0.0:12003 ** Starting Rails with production environment... ** Rails loaded. ** Loading any Rails specific GemPlugins ** Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart). ** Rails signals registered. HUP => reload (without restart). It might not work well. ** Mongrel 1.1.4 available at 0.0.0.0:12003 ** Use CTRL-C to stop. Any other ideas? Thanks -- Posted via http://www.ruby-forum.com/.
Matte Edens
2008-Aug-15 22:32 UTC
[Mongrel] Cant access ROR site externally using mongrel on shared host
since it''s a shared host, are you sure they have port 12003 open for http requests? usually mongrel is sitting behind apache/nginx which proxies the requests to the specified port matte Tam Kbe wrote:> Thanks Elijah for answer. I thought that might be the problem but > Mongrel will actually start at port 0.0.0.0 unless you expliciatly tell > it to start on 127.0.0.1. Here is output of Mongrel. > ** Starting Mongrel listening at 0.0.0.0:12003 > ** Starting Rails with production environment... > ** Rails loaded. > ** Loading any Rails specific GemPlugins > ** Signals ready. TERM => stop. USR2 => restart. INT => stop (no > restart). > ** Rails signals registered. HUP => reload (without restart). It might > not work well. > ** Mongrel 1.1.4 available at 0.0.0.0:12003 > ** Use CTRL-C to stop. > > Any other ideas? > > Thanks >
Tam Kbe
2008-Aug-18 05:45 UTC
[Mongrel] Cant access ROR site externally using mongrel on shared host
Thanks matte that did the trick :) My shared host didn''t have that port open, I assumed they will because CPanel automatically assigned that port for Mongrel! I talked to them and they opened that port..Thanks -- Posted via http://www.ruby-forum.com/.
Gunnar Wolf
2008-Aug-22 21:40 UTC
[Mongrel] Cant access ROR site externally using mongrel on shared host
Tam Kbe dijo [Mon, Aug 18, 2008 at 07:45:20AM +0200]:> Thanks matte that did the trick :) My shared host didn''t have that port > open, I assumed they will because CPanel automatically assigned that > port for Mongrel! I talked to them and they opened that port..ThanksJust FWIW, the usual setup for Mongrel is not having it straight open to the outside world''s requests, but to have it via a HTTP server handling all the static/easy responses (i.e. images), and leaving Mongrel just as a backend, application server. That way, you will decrease the net load on Mongrel. Greetings, -- Gunnar Wolf - gwolf at gwolf.org - (+52-55)5623-0154 / 1451-2244 PGP key 1024D/8BB527AF 2001-10-23 Fingerprint: 0C79 D2D1 2C4E 9CE4 5973 F800 D80E F35A 8BB5 27AF