apache passenger is not running and thus rails app is showin

Yesterday I took the time to install everything to run both PHP and Rails applications on a clean build of Ubuntu linux. However when I'm trying to navigate to my rails dummy app,I see an index page of the public folder.

This is the link: http://rails.kreatude.com/

Whenever I try to run the passenger-status command I receive a:

ERROR: Phusion Passenger doesn't seem to be running.
My passenger configs are (these are in a separate file called passenger.conf):
LoadModule passenger_module /repositories/passenger/ext/apache2/mod_passenger.so
PassengerRoot /repositories/passenger
PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.2-p290/ruby

RailsEnv production

I include these settings in the general conf file (apache2.conf)

...
#
# Define an access log for VirtualHosts that don't define their own logfile
CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined

# Passenger specific configuration:
Include /etc/apache2/passenger.conf

# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
Include /etc/apache2/conf.d/

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/

and my application conf file:

 <virtualhost 178.79.166.172:80="">ServerName rails.kreatude.com
    DocumentRoot /srv/www/rails.kreatude.com/current/public
  <directory src="" www="" rails.kreatude.com="" current="" public="">AllowOverride all
    Options -MultiViews
    Order allow,deny
    Allow from all</directory></virtualhost> 

As an experiment I already tried cd-ing to /srv/www/rails.kreatude.com/current/ and ran rails s. Then I could access my site at: http://rails.kreatude.com:3000 without problems.

I have the lists of all commands I prompted to setup this machine, if you need these for finding a solution feel free to ask. Any help would be appreciated.

PS: I also posted this question at serverfault without any luck. Feel free to aswer where you prefer.

2 Replies

@ayrton:

I see an index page of the public folder.

This is the link: http://rails.kreatude.com/
There isn't a document there like 'index.html' for apache to server, as configured with 'DirectoryIndex', so apache is generating a server side index of the directory. I believe the 'Options' setting controls this.

@ayrton:

I could access my site at: http://rails.kreatude.com:3000 without problems.
If your application works there, then you could redirect traffic to it or proxy it.

Travis

@otherbbs:

@ayrton:

I see an index page of the public folder.

This is the link: http://rails.kreatude.com/
There isn't a document there like 'index.html' for apache to server, as configured with 'DirectoryIndex', so apache is generating a server side index of the directory. I believe the 'Options' setting controls this.

Of course there isn't an index.html, otherwise the rails app would load that particular file, instead of the specified root route.

@otherbbs:

@ayrton:

I could access my site at: http://rails.kreatude.com:3000 without problems.
If your application works there, then you could redirect traffic to it or proxy it.

Afaik you shouldn't run the rails s command to run your rails app in production, instead passenger should do this.

Thanks anyway

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct