Passenger - domain.com only shows directory not homepage

I have followed the linode tutorials for setting up apache2 and passenger

http://library.linode.com/web-servers/a … tual-hosts">http://library.linode.com/web-servers/apache/installation/ubuntu-10.04-lucid#sph_configure-name-based-virtual-hosts

myapp is working fine at example.com:3000. I have followed all the installation instructions for passenger and it appears to be set up correctly

In my virtual host I have:

ServerAdmin webmaster@example.com

ServerName example.com

ServerAlias www.example.com

DocumentRoot /srv/www/example.com/application/public

ErrorLog /srv/www/example.com/logs/error.log

CustomLog /srv/www/example.com/logs/access.log combined

AllowOverride all

Options -Multiviews

I have deleted the index.html file and in my rails app I have set root to: 'pages#home'. I am using rails 3.2.2 in line with the hartl rails tutorial here:

http://ruby.railstutorial.org/chapters/ … on=3.2#top">http://ruby.railstutorial.org/chapters/filling-in-the-layout?version=3.2#top

When I go to example.com, all I see is a list of files in the directory instead of pages#home being served. What could be the problem here? Do I need to do some kind of redirection? Thanks

1 Reply

Not a "ruby guy" so this could be waaaaay off base, but normally when Apache shows a directory instead of a web page it's because you didn't add that type of page in the DirectoryIndex tag inside httpd.conf

Should have something like:

DirectoryIndex index.rhtml index.html index.htm

//or maybe that's the code to collapse the local galaxy cluster - so use at your own risk, or YMMV, or one of those CYA warnings//

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