Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Have rails ignore a specific path

I have a shared/ folder in my my_app/public/ folder and when attempting to access it via www.my_app.com/shared, I see:

no route matches '/shared', :method => 'get'

This makes sense, but I want rails to ignore this folder and just let me use Apache to render a standard directory listing here.

Any way to do this?

like image 953
maček Avatar asked Dec 17 '09 17:12

maček


1 Answers

All you should need to do is disable Passenger for that directory, and make sure Indexes (directory listings) are allowed. In your Apache <VirtualHost> config block, add:

<Location /shared>
  PassengerEnabled off
  Options +Indexes
</Location>
like image 168
Alex Reisner Avatar answered Nov 15 '22 00:11

Alex Reisner