-
Notifications
You must be signed in to change notification settings - Fork 3
Using lighttpd
nevali edited this page Jun 22, 2011
·
2 revisions
Add something like the below to your lighttpd configuration:
$HTTP["host"] =~ "^eregansu\.localhost$"
server.document-root = "/home/developer/eregansu/public"
url.rewrite-once = (
"^(?!/((app|templates|media|content)/.*|favicon.ico))" => "/index.php"
)
}
This assumes you already have the necessary configuration for PHP in place. See the lighttpd documentation for more information on this. A simple setup using fastcgi would be:
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
fastcgi.server = ( ".php" => ((
"socket" => "/tmp/php-fastcgi.socket",
"bin-path" => "/usr/php/5.2/bin/php-cgi",
"max-procs" => 4,
"idle-timeout" => 30,
"broken-scriptfilename" => "enable",
"allow-x-send-file" => "enable",
))
)
index-file.names = ( "index.html", "index.php" )
(This configuration snippet was taken directly from an OpenSolaris host running the Sun-provided PHP 5.2 and lighttpd 1.4 packages — you would need to adjust your paths to suit).