# VPS: Rails service not available

**URL:** <https://www.ruby-forum.com/t/vps-rails-service-not-available/144615>\
**Category:** Deployment\
**Created:** [July 31, 2008, 2:51pm UTC](https://www.ruby-forum.com/t/vps-rails-service-not-available/144615 "2008-07-31T14:51:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![farfignugen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f17d59/32.png) [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Post date:** [July 31, 2008, 2:51pm UTC](https://www.ruby-forum.com/t/vps-rails-service-not-available/144615/1 "2008-07-31T14:51:43Z")

</div>

Hi,

Im running ruby on rails on A debian VPS package.

I have installed ruby / rails all fine. I am now having a problem  
running my project and serving it out to the www. I have created a  
project called “test” in :

/var/www/vhosts/mydomain.com/test

I have installed the mongrel gem and im trying to run the service by  
using the command:

mongrel\_rails start -a 127.0.0.1

when i try to access [www.mydomain.com:3000/test](http://www.mydomain.com:3000/test) i just get the page  
hangining briefly before timing out.

any ideas on what im doing wrong? there are no ports blocked on my  
firewall currently so that all appears to be fine and port 3000 should  
be accessible from the www.

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![farfignugen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f17d59/32.png) [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Post date:** [July 31, 2008, 7:00pm UTC](https://www.ruby-forum.com/t/vps-rails-service-not-available/144615/2 "2008-07-31T19:00:57Z")

</div>

On Jul 31, 5:51 am, Chris G. \<ruby-forum-incom…@andreas-  
[s.net](http://s.net)\> wrote:  
–snip–

> I have installed the mongrel gem and im trying to run the service by  
> using the command:
> 
> mongrel\_rails start -a 127.0.0.1
> 
> when i try to [accesswww.mydomain.com:3000/testi](http://accesswww.mydomain.com:3000/testi) just get the page  
> hangining briefly before timing out.

Presumably someone gave you the above command line without explaining  
what it does. 🙂 The “-a 127.0.0.1” tells mongrel to only listen on  
the 127.0.0.1 interface. That would be the localhost interface and is  
therefore ONLY accessible from that actual machine. If you want to  
access it from elsewhere just start it up with “mongrel\_rails start”  
and you should be ok.

–  
Alex

---

<div class="post-metadata">

**Author:** ![farfignugen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f17d59/32.png) [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Post date:** [July 31, 2008, 9:19pm UTC](https://www.ruby-forum.com/t/vps-rails-service-not-available/144615/3 "2008-07-31T21:19:11Z")

</div>

Alex wrote:

> On Jul 31, 5:51ï¿½am, Chris G. \<ruby-forum-incom…@andreas-  
> [s.net](http://s.net)\> wrote:  
> –snip–
> 
> > I have installed the mongrel gem and im trying to run the service by  
> > using the command:
> > 
> > mongrel\_rails start -a 127.0.0.1
> > 
> > when i try to [accesswww.mydomain.com:3000/testi](http://accesswww.mydomain.com:3000/testi) just get the page  
> > hangining briefly before timing out.
> 
> Presumably someone gave you the above command line without explaining  
> what it does. 🙂 The “-a 127.0.0.1” tells mongrel to only listen on  
> the 127.0.0.1 interface. That would be the localhost interface and is  
> therefore ONLY accessible from that actual machine. If you want to  
> access it from elsewhere just start it up with “mongrel\_rails start”  
> and you should be ok.
> 
> –  
> Alex

Thanks for the reply Alex.

I have actually attempted to run the command you suggested on its own  
and it still doesnt serve the project for me.

I cant work out whats wrong here at all.

---

<div class="post-metadata">

**Author:** ![farfignugen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f17d59/32.png) [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Post date:** [July 31, 2008, 11:28pm UTC](https://www.ruby-forum.com/t/vps-rails-service-not-available/144615/4 "2008-07-31T23:28:31Z")

</div>

and if i attempt with the ip address of the machine:

vps-1000885-330:/var/www/vhosts/chris-gallagher.com/httpdocs/test#  
mongrel\_rails start -a 78.153.208.167  
\*\* Ruby version is not up-to-date; loading cgi\_multipart\_eof\_fix  
\*\* Starting Mongrel listening at 78.153.208.167:3000  
\*\* Starting Rails with development 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.5 available at 78.153.208.167:3000  
\*\* Use CTRL-C to stop.

---

<div class="post-metadata">

**Author:** ![farfignugen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f17d59/32.png) [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Post date:** [August 1, 2008, 2:53pm UTC](https://www.ruby-forum.com/t/vps-rails-service-not-available/144615/5 "2008-08-01T14:53:08Z")

</div>

sorted this out with a config file for mongrel. silly mistake! 🙂

---

<div class="post-metadata">

**Author:** ![farfignugen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f17d59/32.png) [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Post date:** [July 31, 2008, 11:22pm UTC](https://www.ruby-forum.com/t/vps-rails-service-not-available/144615/6 "2008-07-31T23:22:52Z")

</div>

by the way heres the output from running mongrel\_rails start

vps-1000885-330:/var/www/vhosts/chris-gallagher.com/test# mongrel\_rails  
start  
\*\* Ruby version is not up-to-date; loading cgi\_multipart\_eof\_fix  
\*\* Starting Mongrel listening at 0.0.0.0:3000  
\*\* Starting Rails with development 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.5 available at 0.0.0.0:3000  
\*\* Use CTRL-C to stop.
