DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Very Basic Lighttpd Configuration

10.17.2006
| 7032 views |
  • submit to reddit
        The configuration of lighttpd is vast and complex. Here is a close to minimal configuration which allows for Perl and Ruby CGI.

server.document-root = "/opt/lighttpd/htdocs"

server.port = 3000

mimetype.assign = (
  ".html" => "text/html",
  ".txt" => "text/plain",
  ".jpg" => "image/jpeg",
  ".png" => "image/png"
)

static-file.exclude-extensions = ( ".rb", ".pl", ".fcgi", ".php", ".rb", "~", ".inc" )
index-file.names = ( "index.html" )
server.modules += ( "mod_cgi" )

cgi.assign = (  ".rb" => "/opt/ruby/bin/ruby",
                ".pl" => "/usr/bin/perl")