开发者

Have rails ignore a specific path

开发者 https://www.devze.com 2022-12-14 19:13 出处:网络
I have a shared/ folder in my my_app/public/ fold开发者_开发技巧er and when attempting to access it via www.my_app.com/shared, I see:

I have a shared/ folder in my my_app/public/ fold开发者_开发技巧er 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?


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>
0

精彩评论

暂无评论...
验证码 换一张
取 消