| 1 | # at least mod_access and mod_accesslog should be loaded |
|---|
| 2 | # all other module should only be loaded if really neccesary |
|---|
| 3 | server.modules = ( |
|---|
| 4 | # "mod_flv_streaming", |
|---|
| 5 | # "mod_rewrite", |
|---|
| 6 | # "mod_redirect", |
|---|
| 7 | # "mod_alias", |
|---|
| 8 | "mod_access", |
|---|
| 9 | # "mod_cml", |
|---|
| 10 | # "mod_trigger_b4_dl", |
|---|
| 11 | # "mod_auth", |
|---|
| 12 | # "mod_status", |
|---|
| 13 | # "mod_setenv", |
|---|
| 14 | "mod_proxy_core", |
|---|
| 15 | "mod_proxy_backend_http", |
|---|
| 16 | # "mod_proxy_backend_fastcgi", |
|---|
| 17 | # "mod_proxy_backend_scgi", |
|---|
| 18 | # "mod_proxy_backend_ajp13", |
|---|
| 19 | # "mod_simple_vhost", |
|---|
| 20 | # "mod_evhost", |
|---|
| 21 | # "mod_userdir", |
|---|
| 22 | # "mod_cgi", |
|---|
| 23 | # "mod_compress", |
|---|
| 24 | # "mod_ssi", |
|---|
| 25 | # "mod_usertrack", |
|---|
| 26 | # "mod_expire", |
|---|
| 27 | # "mod_secdownload", |
|---|
| 28 | # "mod_rrdtool", |
|---|
| 29 | "mod_accesslog" ) |
|---|
| 30 | |
|---|
| 31 | ## a static document-root, for virtual-hosting take look at the |
|---|
| 32 | ## server.virtual-* options |
|---|
| 33 | server.document-root = "/var/www/localhost/htdocs" |
|---|
| 34 | |
|---|
| 35 | ## where to send error-messages to |
|---|
| 36 | server.errorlog = "/var/log/lighttpd/error.log" |
|---|
| 37 | |
|---|
| 38 | # files to check for if .../ is requested |
|---|
| 39 | index-file.names = ( "index.php", "index.html", |
|---|
| 40 | "index.htm", "default.htm" ) |
|---|
| 41 | |
|---|
| 42 | # mimetype mapping |
|---|
| 43 | include "mime-types.conf" |
|---|
| 44 | |
|---|
| 45 | # Use the "Content-Type" extended attribute to obtain mime type if possible |
|---|
| 46 | #mimetype.use-xattr = "enable" |
|---|
| 47 | |
|---|
| 48 | |
|---|
| 49 | #### accesslog module |
|---|
| 50 | accesslog.filename = "/var/log/lighttpd/access.log" |
|---|
| 51 | |
|---|
| 52 | ## deny access the file-extensions |
|---|
| 53 | # |
|---|
| 54 | # ~ is for backupfiles from vi, emacs, joe, ... |
|---|
| 55 | # .inc is often used for code includes which should in general not be part |
|---|
| 56 | # of the document-root |
|---|
| 57 | url.access-deny = ( "~", ".inc" ) |
|---|
| 58 | |
|---|
| 59 | ## |
|---|
| 60 | # which extensions should not be handle via static-file transfer |
|---|
| 61 | # |
|---|
| 62 | # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi |
|---|
| 63 | static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) |
|---|
| 64 | |
|---|
| 65 | ######### Options that are good to be but not neccesary to be changed ####### |
|---|
| 66 | |
|---|
| 67 | ## bind to port (default: 80) |
|---|
| 68 | server.port = 81 |
|---|
| 69 | |
|---|
| 70 | ## to help the rc.scripts |
|---|
| 71 | server.pid-file = "/var/run/lighttpd.pid" |
|---|
| 72 | |
|---|
| 73 | |
|---|
| 74 | ## change uid to <uid> (default: don't care) |
|---|
| 75 | server.username = "lighttpd" |
|---|
| 76 | |
|---|
| 77 | ## change uid to <uid> (default: don't care) |
|---|
| 78 | server.groupname = "lighttpd" |
|---|
| 79 | |
|---|
| 80 | # proxy-core settings |
|---|
| 81 | $HTTP["url"] =~ "^/video/.*flv$" { |
|---|
| 82 | proxy-core.balancer = "static" |
|---|
| 83 | proxy-core.protocol = "http" |
|---|
| 84 | proxy-core.backends = ( "video.test.com:80" ) |
|---|
| 85 | proxy-core.max-pool-size = 64 |
|---|
| 86 | } |
|---|
| 87 | |
|---|
| 88 | # log requests? |
|---|
| 89 | # debug.log-request-handling = "enable" |
|---|
| 90 | |
|---|
| 91 | # control settings for timeouts |
|---|
| 92 | server.max-keep-alive-requests = 4 |
|---|
| 93 | server.max-keep-alive-idle = 4 |
|---|
| 94 | server.max-read-idle = 10 |
|---|
| 95 | server.max-write-idle = 10 |
|---|