lighttpd.conf
June 6th, 2006
I use lighttpd for development on my box. I am currently working with Ruby on Rails and PHP
For PHP I am using Code Igniter so the rewrite rule for the php subdomain reflects this. To see my configuration keep reading…
server.modules = (
"mod_rewrite",
"mod_access",
"mod_fastcgi",
"mod_accesslog",
"mod_compress",
"mod_expire"
)
server.document-root = "/Users/kenny/Sites/standard/"
server.port = 80
server.username = "www"
server.groupname = "www"
mimetype.assign = (
".css" => "text/css",
".gif" => "image/gif",
".htm" => "text/html",
".html" => "text/html",
".xml" => "text/xml",
".jpeg" => "image/jpeg",
".jpg" => "image/jpeg",
".js" => "text/javascript",
".png" => "image/png",
".swf" => "application/x-shockwave-flash",
".txt" => "text/plain"
)
compress.filetype = ("text/plain",
"text/html",
"text/css",
"text/javascript"
)
static-file.exclude-extensions = ( ".fcgi", ".php", ".rb", "~", ".inc" )
index-file.names = ( "index.html", "index.htm", "index.php" )
# Making sure file uploads above 64k always work when using IE or Safari
# For more information, see http://trac.lighttpd.net/trac/ticket/360
$HTTP["useragent"] =~ "^(.*MSIE.*)|(.*AppleWebKit.*)$" {
server.max-keep-alive-requests = 0
}
$HTTP["host"] == "php.localhost" {
server.document-root = "/Users/kenny/Sites/php/"
url.rewrite = ( "^/$" => "index.php", "^([^.]+)$" => "index.php/$1" )
fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/local/bin/php",
"socket" => "/tmp/php.socket",
"max-procs" => 2,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "16",
"PHP_FCGI_MAX_REQUESTS" => "10000"
),
"bin-copy-environment" => (
"PATH", "SHELL", "USER"
),
"broken-scriptfilename" => "enable"
)))
}
$HTTP["host"] == "rails.localhost" {
server.document-root = "/Users/kenny/Sites/rails/public"
server.indexfiles = ( "index.html" )
server.error-handler-404 = "/dispatch.fcgi"
url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "$1.html" )
compress.cache-dir = "/Users/kenny/Sites/rails/tmp/cache"
expire.url = ("/favicon.ico" => "access 3 days",
"/images/" => "access 3 days",
"/stylesheets/" => "access 3 days",
"/javascripts/" => "access 3 days"
)
# rails stuff
#### fastcgi module
fastcgi.server = (
".fcgi" => (
"rails" => (
"socket" => "/tmp/rails.socket",
"bin-path" => "/Users/kenny/Sites/rails/public/dispatch.fcgi",
"min-procs" => 1,
"max_procs" => 2
)
)
)
}
June 20th, 2006 at 05:40 AM Hey man, thanx for that php section. It was exaclty what I was looking for. Its such a pain having to support so many environments: PHP4, PHP5, Rails, Java, Python, etc, etc...
August 15th, 2007 at 11:21 AM
agpgasmo 307i193v2rgbvk81m x8z86nxj
November 18th, 2007 at 01:44 PM
http://cialisviagraonlinepharmacyzql.blogspot.com http://howtobuyphentermineowq.blogspot.com http://isvicodinaddictingaqu.blogspot.com http://adipex375mgtabletncr.blogspot.com http://kgr100viagranhm.blogspot.com http://percocetvicodinvsndq.blogspot.com http://cheaptramadol300ct50mgnoprjm.blogspot.com http://modelworkshopssomasanfrancjvs.blogspot.com
May 30th, 2008 at 11:49 PM
This is a awesome note, thank you very much
November 12th, 2008 at 06:32 PM
1ckz2nh8mvjt3731