> Probably a trivial one: where do I access a Rails site when it is
configured
> by a rule like this:
> ".fcgi" =>
> ( "localhost" =>
> (
> "socket" =>
"/tmp/rails.socket",
> "bin-path" =>
> "/home/bougyman/www/bougyhome/public/dispatch.fcgi"
> )
> )
I''m no expert on lighttpd. I did just set mine up yesterday though.
Here''s the relevant part of my lighttpd.conf, with "myname"
and
"mysite" in place of my actual names. Also note that I created a
directory called "rails" in my home directory. Most of the tutorials
for this have the directory named "sites", but it doesn''t
really
matter what you call it, as long as you reference it correctly in your
conf file.
fastcgi.server = ( ".fcgi" =>
("myname.textdriven.com" =>
("socket" =>
"/home/myname/var/run/rails.socket",
"bin-path" =>
"/home/myname/rails/enabled/public/dispatch.fcgi",
"bin-environment" => ("RAILS_ENV"
=>
"production", "RAILS_ROOT" =>
"/home/myname/rails/mysite/"),
"min-procs" => 1,
"max-procs" => 5
)
)
)
> Related: this does not affect my documentroot does it? I want to have
> hosting for several users so I''d rather not set my documentroot to
/
> or /home of course!
Your document root is set in a different part of lightttpd.conf:
server.document-root = "/home/myname/rails/mysite/public"
> What is the meaning of the socket parameter? According to the documentation
> it is "path to the unix-domain socket" but who creates that
socket? Rails
> or FastCGI?
> Currently I manually created some sockets like written in the tutorial. Why
> are there multiple sockets with the same binpath in the tuturial? Does that
> affect performance?
> Is it possible to use different binpaths in one fastcgi.server entry? I
used
> multiple of them now and FastCGI complained about my path not existing in
> the first entry but not on non-existing paths later on...
> Can I allow users to set up their own rails hosting without my interference
> in the configuration? I''d like a user to be able to change his
Rails root
> path or create new Rails sites, is that possible?
>
> Thanks for your help so far, this is a wonderful community!
As far as creating new rails sites, it would depend on your host.
Typically that would be taken care of by you as the account holder at
your host.
This is a useful thread for more documentation and tips:
http://forum.textdrive.com/viewtopic.php?id=2782
Also, searching the rubyonrails.org wiki and forum.textdrive.com for
"lighttpd" will provide a lot of info.
Good luck!
--
- TJ