Best practice?

Hi,

I am new to Ruby on Rails, and should like to validate the following
assumptions:

  • static html is best placed in the public directory of the server such
    as Apache rather than the public or views directory of the RoR
    application e.g. static home page with links to my RoR application
  • under CGI/FastCGI, the server will first try to find files in its own
    filesystem before passing through CGI/FastCGI

Thanks in advance,
Lee.

Hi Lee

Lee L. wrote:

  • static html is best placed in the public directory of the server such
    as Apache rather than the public or views directory of the RoR
    application e.g. static home page with links to my RoR application

Depends on the content. Static content thats part of your app should
probably be put in your app/public directory (just to keep it all nice
and together). Static content that nothing to do with your app probably
shouldn’t be there, and would be more sensibly placed elsewhere on your
webserver. I don’t believe there’s any performance difference as
static content anywhere will be served directly by your server before it
even tries to talk to rails. (see below)

  • under CGI/FastCGI, the server will first try to find files in its own
    filesystem before passing through CGI/FastCGI

The default apache or lighty configs supplied with a generated rails app
work that way (look locally, route to the rails app instead of a 404),
but thats a webserver config issue, not something inherent in FCGI.

A.