Apache lists contents of /public directory


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
mailing list, but can’t figure this out.

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

any idea’s?



I should probably mention that I’m running this on windows xp


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

RewriteEngine On

It might be something else, but that’s one possibility.


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?