Apache/Rails/Passenger directory URLs that don't end in '/' fail to 404.

Posted by Portamento on Stack Overflow See other posts from Stack Overflow or by Portamento
Published on 2009-04-12T00:24:27Z Indexed on 2010/05/08 9:08 UTC
Read the original article Hit count: 245

Filed under:
|
|
|

I'm using Apache with passenger to run a rails app. In my rails app, I have some static content in subdirectories of the public directory. Each subdirectory has an index.html in it.

So, inside the public directory, I have a subdir called 'b' and inside it, is an index.html. So it's like this:

/public/b/index.html

I have links to these pages, of the form:

http://a.com/b

If I do this in my regular non-rails web directory, Apache correctly rewrites this URL to be http://a.com/b/ which then, subsequently shows the index.html. It's only when accessing my rails app that it doesn't work. In fact, if I turn off passenger mod... so it just accesses my rails app like a regular document root, it works correctly also.

What the heck do I need to do to get this to work properly with passenger? Again, it works fine in apache itself when passenger is not involved.

I am running passenger 2.1.3. I have another server running passenger 2.0 that doesn't seem to have this problem, but I don't see anything different in the config other than the different versions of passenger itself.

HELP! Been working on this for two days solid with no improvement!

© Stack Overflow or respective owner

Related posts about passenger

Related posts about apache