snacktime wrote:> I know this is probably more lighttpd specific but I''m only stuck
on
> one little thing and thought someone might have an answer.
>
> Say I have a controller mycontroller setup with the default
> scaffolding.. Lighttpd is running but is returning a 404 for
> everything but /public/index.html. Lighttpd is bound to one ip on
> port 80 with no virtual host stuff configured.
>
>>From a quick look it appears that the following would tell the server
> that every request to rails.paymentonline.net gets served by whatever
> is specified in bin-path. Is that correct? I''m kind of guessing
here
> but that''s the only thing that seems to make sense. However it
> doesn''t seem to work. What piece of the picture am I missing
here?
>
> Chris
>
>
> $HTTP["host"] =~ "rails\.paymentonline\.net" {
> server.error-handler-404 = "/dispatch.fcgi"
> server.indexfiles = ( "dispatch.fcgi", "index.html" )
> server.document-root = "/home/chris/rails/track/public"
> fastcgi.server = (".fcgi" => ( "railsapp" =>
> ( "min-procs" => 1,
> "max-procs" => 5,
> "socket" => "/tmp/ruby-railsapp.fcgi",
> "bin-path" =>
"/home/chris/rails/track/public/dispatch.fcgi",
> "bin-environment" => ( "RAILS_ENV" =>
"development" )
> )
> ))
> }
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
Hi,
This is my lighttpd.conf, as reference:
#### default host
$HTTP["host"] =~ "" {
server.document-root = "/sites/jkcosta.info/www/public"
fastcgi.server = (
".fcgi" => ( "localhost" => (
"min-procs" => 1,
"max-procs" => 5,
"socket" => "/tmp/lighttpd/jkcosta.info.socket",
"bin-path" =>
"/sites/jkcosta.info/www/public/dispatch.fcgi",
"bin-environment" => ( "RAILS_ENV" =>
"production" )
) )
)
server.error-handler-500 = "/500.html"
server.error-handler-404 = "/dispatch.fcgi"
cgi.assign = (".rb" => "/usr/local/bin/ruby",
".cgi" =>
"/usr/local/bin/ruby"
)
}
Ensure that the lighttpd user/group have the permission to write the
sockets. In my case, its rwx for the group lighttpd in /tmp/lighttpd
dir. Also, ensure that lighttpd have execute permissions to dispatch.fcgi .
Actually, as my lighttpd isn''t configured to
''rewrite'' the URL (I don''t
even know if its possible in lighttpd), every ''Rails URL''
should return
a 404 error. The ''catcher'' for 404 is my dispatcher.fcgi. So,
if the
file doesn''t exists, go to rails :-)
Also, what''s in your error log?
regards,
--
juca
juca at jkcosta dot info
htt://jkcosta.info