Forum: Ruby on Rails lighttpd rails

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
81d253d1ae5907d4daa79ae9a4338d1b?d=identicon&s=25 Vincent Gov (Guest)
on 2006-03-23 19:52
(Received via mailing list)
I'm running lighttpd + fastcgi + rails
Say that the lighttpd root directory is the rails application /public
I'm just curious.
If theres a file in the document root with the same name as a
does the file get served first?
How does that work?  Does lighttpd check the root directory first to see
the file exists-  If not, it calls dispatch.fcgi?  I want to know if the
rails app is called in any way if i'm just serving static files that are
the /public directory- such as images and text files.
8e44c65ac5b896da534ef2440121c953?d=identicon&s=25 Ezra Zygmuntowicz (Guest)
on 2006-03-23 22:33
(Received via mailing list)
On Mar 23, 2006, at 10:52 AM, Vincent Gov wrote:

> text files.
> --
> Vincent H Gov
> _______________________________________________
> Rails mailing list


	The way dispatch.fcgi works is that it is assigned to be the error
handler in the lighty.conf file./ So lighty first checks public for
files that match the url and serves them directly without invoking
rails if they exist. If they don't exist then a 404 error is raised
and sent to dispatch.fcgi for rails to sort out.

	This liine in your lighttpd.conf file is what looks for fo.html if
the url is /foo

         url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" =>
"$1.html" )

	So the short answer is yes, if you put .html files in the public dir
or any subdir in public it will get served by lighty without ever
invoking rails.

81d253d1ae5907d4daa79ae9a4338d1b?d=identicon&s=25 Vincent Gov (Guest)
on 2006-03-24 05:09
(Received via mailing list)
hmm.. those lines are commented out in my conf file.
This topic is locked and can not be replied to.