I am using Ruby on Rails on a CentOS-server with apache 2.0. But somehow the root of the website does not load. It comes up as a download, with the right contents. But it needs to be server as html. Other links within the site are working fine (by adding a text/html type to the .htaccess). Also, when accessing the mongrel directly root does come up. Or when i put a index.html in the public folder of the rails app, it gets loaded as well.

My .htaccess:

DefaultType text/html # added for the other pages to get them working, like /products
RewriteCond %{HTTP_HOST} ^www.example.com$
RewriteRule .* "http://127.0.0.1:12001%{REQUEST_URI}" [P,QSA,L]

Rails version: 2.3.8
Mongrel version: 1.1.5
Apache version: 2.0.63

Accepted Answer

Due to a bug in mongrel_start, it wasn't working properly. This fixed the problem. Hope it can be a help for someone else in the future as well.

Written by Tim
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki