No default .htaccess

Hey all!

I just created my first RoR project (following this guide http://wiki.rubyonrails.org/start), and I had some trouble getting everything to work under apache with passenger. After some debugging I found out I simply didn't had any .htaccess in my public/ folder. People around the interwebz seemed to imply there should be one by default, so my questions are :

- Why wasn't there one created with my application? - Also, I didn't have any problem when I ran my application using webrick. How come?

Thanks.

Hey all!

I just created my first RoR project (following this guidehttp://wiki.rubyonrails.org/start), and I had some trouble getting everything to work under apache with passenger. After some debugging I found out I simply didn't had any .htaccess in my public/ folder. People around the interwebz seemed to imply there should be one by default, so my questions are :

You don't need a .htaccess in public for passenger (in fact with an older app that I migrated to passenger recently, the old .htaccess was there stopped passenger from working). It was removed because it was only used for fastcgi which is pretty much obsolete as a method for deploying rails apps

Fred

Frederick Cheung wrote:

Hey all!

I just created my first RoR project (following this guidehttp://wiki.rubyonrails.org/start), and I had some trouble getting everything to work under apache with passenger. After some debugging I found out I simply didn't had any .htaccess in my public/ folder. People around the interwebz seemed to imply there should be one by default, so my questions are :

You don't need a .htaccess in public for passenger (in fact with an older app that I migrated to passenger recently, the old .htaccess was there stopped passenger from working). It was removed because it was only used for fastcgi which is pretty much obsolete as a method for deploying rails apps

Fred

Okay... then let me describe the issue I had with passenger (and not with webrick), I guess the problem lies elsewhere : in the 'First application' part of the wiki, you create a table and the correspondent controller and views. I just can't access this controller, I get an error 500 from apache. Furthermore, when I checked the log, I get this :

[Thu May 20 21:07:08 2010] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace. [Thu May 20 21:07:08 2010] [debug] core.c(3063): [client 127.0.0.1] r->uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r->uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r->uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r->uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r->uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r->uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r->uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r->uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r->uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r->uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r->uri = /users

Also, here's what I've got in my apache configuration :

NameVirtualHost 127.0.0.1:3000

Listen 127.0.0.1:3000

<VirtualHost 127.0.0.1:3000>   DocumentRoot "/home/simon/projet-web/blog/public"   DirectoryIndex index.html   LogLevel debug   RailsEnv development

  <Directory "/home/simon/projet-web/blog/public">      AllowOverride All      Options -MultiViews   </Directory> </VirtualHost>

Thanks again!

Are you sure there's not some other stuff (eg some rewrite rules) that be being used - I don't see how just the above + your rails app would be doing redirects to a .php url

Fred

Frederick Cheung wrote: