Tuesday, August 2, 2011

Run Zend Framework (1.11) on lighttpd

Make sure this two mods are enabled on yer lighttpd.conf:

mod_rewrite

mod_setenv

And add this to your host config:

$HTTP["host"] == "localhost" {
  url.rewrite-if-not-file = (
    ".*\?(.*)$" => "/index.php?$1",
    "" => "/index.php"
  )

  # Not necessary, but most of Zend applications use it
  setenv.add-environment = (
    "APPLICATION_ENV" => "development"
  )
}