Forum: Ruby on Rails Apache lists contents of /public directory

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Iain Rose (Guest)
on 2006-02-16 20:36
(Received via mailing list)
I'm trying to get my rails app running on Apache. I'm running Apache
1.3.34and am only trying to get it working in CGI mode for now.

I've followed the instructions in the Agile book, as well as searching
this
mailing list, but can't figure this out.

I've created the virtual directory in httpd.conf but when I try to lauch
the
app in my browser, I just get the index of my /public folder displayed.

any idea's?

Iain
Iain Rose (Guest)
on 2006-02-16 21:57
(Received via mailing list)
I should probably mention that I'm running this on windows xp
Tony G. (Guest)
on 2006-02-16 22:40
(Received via mailing list)
Generally, it sounds like Apache is not passing requests to your
dispatch.(f)cgi as it should.  It could be that mod_rewrite isn't
loaded or working... normally any request made to your application is
rewritten to point to dispatch.(f)cgi.

Since the rewrite rules are stored in public/.htaccess, you need to
make sure that Apache is reading this file - use the "AllowOverride
All" directive for this.  My httpd.conf (admittedly on Linux, but hey)
looks like this:

<Directory /var/www/rails/*/public>
  Options +ExecCGI +FollowSymLinks
  AddHandler fastcgi-script .fcgi
  AllowOverride all
  <IfModule mod_rewrite.c>
    RewriteEngine On
  </IfModule>
</Directory>

It might be something else, but that's one possibility.
Craig W. (Guest)
on 2006-02-17 01:08
(Received via mailing list)
On Thu, 2006-02-16 at 10:34 -0800, Iain Rose wrote:
> any idea's?
----
yeah - I had that Tuesday

did you set the default route in routes.db ?

what does public/.htaccess look like?

Craig
This topic is locked and can not be replied to.