Forum: Ruby on Rails lighttpd with Rails + PHP

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3ccdcc71db4c8212fba584953572bf51?d=identicon&s=25 Noel R. Morais (Guest)
on 2006-04-20 17:11
(Received via mailing list)
How can i make lighttpd work with rails and php?
2f9a03aa0fcfe945229cb6126eda2cb2?d=identicon&s=25 Philip Hallstrom (Guest)
on 2006-04-21 00:01
(Received via mailing list)
> How can i make lighttpd work with rails and php?

This works for me:

server.indexfiles    = ("index.php", "index.html", "dispatch.fcgi")
server.error-handler-404 = "/dispatch.fcgi"
static-file.exclude-extensions = (".php", ".pl", ".cgi", ".fcgi")
$HTTP["host"] == "mydomain.com" {
         server.document-root = "/home/philip/cpr/web/public/"
         server.error-handler-404 = "/dispatch.fcgi"
         fastcgi.server = (
                 ".php" => (
                         (
                         "bin-path" => "/usr/local/bin/php-cgi",
                         "socket" => "/tmp/php.socket",
                         "broken-scriptfilename" => "enable"
                         )
                 ),
                 ".fcgi" => (
                         (
                         "host" => "127.0.0.1",
                         "port" => 8003,
                         "bin-environment" => ( "RAILS_ENV" =>
"development")
                         ),
                         (
                         "host" => "127.0.0.1",
                         "port" => 8004,
                         "bin-environment" => ( "RAILS_ENV" =>
"development")
                         ),
                         (
                         "host" => "127.0.0.1",
                         "port" => 8005,
                         "bin-environment" => ( "RAILS_ENV" =>
"development")
                         ),
                 )

         )
}

I start up my fast cgi processes for rails like this:

script/process/spawner -p 8003 -i 3 -e development

and /usr/local/bin/php-cgi is the FCGI version of php.

Any PHP files in public get executed via PHP.

Seems to work.
This topic is locked and can not be replied to.