De acordo com a documentação do lighttpd no link , a maneira correta de fazer isso é usar mod_setenv
-
setenv.add-environment
Adds a value to the process environment (aka environment variables) that is passed to the external applications:
setenv.add-environment = ( "TRAC_ENV" => "lighttpd", "RAILS_ENV" => "production" )