# Cant access ROR site externally using mongrel on shared host

**URL:** <https://www.ruby-forum.com/t/cant-access-ror-site-externally-using-mongrel-on-shared-host/145999>\
**Category:** Mongrel\
**Created:** [August 15, 2008, 11:18pm UTC](https://www.ruby-forum.com/t/cant-access-ror-site-externally-using-mongrel-on-shared-host/145999 "2008-08-15T23:18:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tkbeili](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@tkbeili](https://www.ruby-forum.com/u/tkbeili)\
**Post date:** [August 15, 2008, 11:18pm UTC](https://www.ruby-forum.com/t/cant-access-ror-site-externally-using-mongrel-on-shared-host/145999/1 "2008-08-15T23:18:45Z")

</div>

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](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](http://www.mysite.com:12003/users) - [www.mysite.com/12003/users](http://www.mysite.com/12003/users) -  
[www.mysite.com/mysite/users](http://www.mysite.com/mysite/users)

Is there a rule or configuration I have to do for this to work?

Thanks in Advance,

Tam

---

<div class="post-metadata">

**Author:** ![tkbeili](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@tkbeili](https://www.ruby-forum.com/u/tkbeili)\
**Post date:** [August 15, 2008, 11:31pm UTC](https://www.ruby-forum.com/t/cant-access-ror-site-externally-using-mongrel-on-shared-host/145999/2 "2008-08-15T23:31:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tkbeili](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@tkbeili](https://www.ruby-forum.com/u/tkbeili)\
**Post date:** [August 16, 2008, 12:17am UTC](https://www.ruby-forum.com/t/cant-access-ror-site-externally-using-mongrel-on-shared-host/145999/3 "2008-08-16T00:17:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tkbeili](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@tkbeili](https://www.ruby-forum.com/u/tkbeili)\
**Post date:** [August 16, 2008, 12:45am UTC](https://www.ruby-forum.com/t/cant-access-ror-site-externally-using-mongrel-on-shared-host/145999/4 "2008-08-16T00:45:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tkbeili](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@tkbeili](https://www.ruby-forum.com/u/tkbeili)\
**Post date:** [August 23, 2008, 4:31am UTC](https://www.ruby-forum.com/t/cant-access-ror-site-externally-using-mongrel-on-shared-host/145999/5 "2008-08-23T04:31:14Z")

</div>

Tam K. 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…Thanks

Just 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 W. - removed\_email\_address@domain.invalid - (+52-55)5623-0154 / 1451-2244  
PGP key 1024D/8BB527AF 2001-10-23  
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973 F800 D80E F35A 8BB5 27AF

---

<div class="post-metadata">

**Author:** ![tkbeili](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@tkbeili](https://www.ruby-forum.com/u/tkbeili)\
**Post date:** [August 18, 2008, 7:45am UTC](https://www.ruby-forum.com/t/cant-access-ror-site-externally-using-mongrel-on-shared-host/145999/6 "2008-08-18T07:45:20Z")

</div>

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
