Forum: Rails France lighttpd,ruby on rails et 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.
Ralph H. (Guest)
on 2009-01-14 13:12
Comment puis je configurer lighttpd server pour executer les scripts
ruby et php??
Merci d avance
Renaud (Nel) Morvan (Guest)
on 2009-01-14 14:03
(Received via mailing list)
En lisant la doc de lighty par exemple :)

Il suffit d'avoir deux sections différentes dans le fichier de conf,
php et rails tourneront en fastcgi mais avec des jeux de process
différent

$HTTP["host"] == "monsiterails.com" {
var.appname = "monsiterails"
var.app_path = "/var/www/" + var.appname + "/current"

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

server.error-handler-404        = "/dispatch.fcgi"
fastcgi.server = ( ".fcgi" =>
                   ( "localhost" =>
                     ( "min-procs" => 3,
                       "max-procs" => 3,
                       "socket" => "/tmp/" + var.appname +
".fcgi.socket",
                       "bin-path" => var.app_path + "/public/
dispatch.fcgi",
                       "bin-environment" => ( "RAILS_ENV" =>
"preprod" )
                      )
                    )
                  )
}
else $HTTP["host"] == "monsitephp.ru" {
  server.document-root = "/var/www/monsitephp/"
  fastcgi.server = (".php" =>
    ((
      "bin-path" => "/usr/bin/php5-cgi",
      "socket" => "/tmp/php.socket"
    ))
  )
}

C'est pas toute la conf lighty mais c'est la partie spécifique pour
faire ce que tu veux, le reste tu le trouvera dans ton fichier par
default
This topic is locked and can not be replied to.