]> rtime.felk.cvut.cz Git - hydro.git/blob - app-bohyn/lighttpd_conf/lighttpd.conf
repairs
[hydro.git] / app-bohyn / lighttpd_conf / lighttpd.conf
1 # Debian lighttpd configuration file
2 #
3
4 ############ Options you really have to take care of ####################
5
6 ## modules to load
7 # mod_access, mod_accesslog and mod_alias are loaded by default
8 # all other module should only be loaded if neccesary
9 # - saves some time
10 # - saves memory
11
12 server.modules              = (
13             "mod_access",
14             "mod_alias",
15             "mod_accesslog",
16             "mod_compress",
17 #           "mod_fastcgi",
18 #           "mod_rewrite",
19 #           "mod_redirect",
20 #           "mod_evhost",
21 #           "mod_usertrack",
22 #           "mod_rrdtool",
23 #           "mod_webdav",
24 #           "mod_expire",
25 #           "mod_flv_streaming",
26 #           "mod_evasive"
27 )
28
29 ## a static document-root, for virtual-hosting take look at the
30 ## server.virtual-* options
31 server.document-root       = "/var/www/"
32
33 ## where to upload files to, purged daily.
34 server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
35
36 ## where to send error-messages to
37 server.errorlog            = "/var/log/lighttpd/error.log"
38
39 ## files to check for if .../ is requested
40 index-file.names           = ( "index.php", "index.html",
41                                "index.htm", "default.htm",
42                                "index.lighttpd.html" )
43
44
45 ## Use the "Content-Type" extended attribute to obtain mime type if possible
46 # mimetype.use-xattr = "enable"
47
48 #### accesslog module
49 accesslog.filename         = "/var/log/lighttpd/access.log"
50
51 ## deny access the file-extensions
52 #
53 # ~    is for backupfiles from vi, emacs, joe, ...
54 # .inc is often used for code includes which should in general not be part
55 #      of the document-root
56 url.access-deny            = ( "~", ".inc" )
57
58 ##
59 # which extensions should not be handle via static-file transfer
60 #
61 # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
62 static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
63
64
65 ######### Options that are good to be but not neccesary to be changed #######
66
67 ## Use ipv6 only if available.
68 include_shell "/usr/share/lighttpd/use-ipv6.pl"
69
70 ## bind to port (default: 80)
71 server.port               = 81
72
73 ## bind to localhost only (default: all interfaces)
74 ## server.bind                = "localhost"
75
76 ## error-handler for status 404
77 #server.error-handler-404  = "/error-handler.html"
78 #server.error-handler-404  = "/error-handler.php"
79
80 ## to help the rc.scripts
81 server.pid-file            = "/var/run/lighttpd.pid"
82
83 ##
84 ## Format: <errorfile-prefix><status>.html
85 ## -> ..../status-404.html for 'File not found'
86 #server.errorfile-prefix    = "/var/www/"
87
88 ## virtual directory listings
89 dir-listing.encoding        = "utf-8"
90 server.dir-listing          = "enable"
91
92 ## send unhandled HTTP-header headers to error-log
93 #debug.dump-unknown-headers  = "enable"
94
95 ### only root can use these options
96 #
97 # chroot() to directory (default: no chroot() )
98 #server.chroot            = "/"
99
100 ## change uid to <uid> (default: don't care)
101 server.username            = "www-data"
102
103 ## change uid to <uid> (default: don't care)
104 server.groupname           = "www-data"
105
106 #### compress module
107 compress.cache-dir          = "/var/cache/lighttpd/compress/"
108 compress.filetype           = ("text/plain", "text/html", "application/x-javascript", "text/css")
109
110
111 #### url handling modules (rewrite, redirect, access)
112 # url.rewrite                 = ( "^/$"             => "/server-status" )
113 # url.redirect                = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
114
115 #
116 # define a pattern for the host url finding
117 # %% => % sign
118 # %0 => domain name + tld
119 # %1 => tld
120 # %2 => domain name without tld
121 # %3 => subdomain 1 name
122 # %4 => subdomain 2 name
123 #
124 # evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
125
126 #### expire module
127 # expire.url                  = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
128
129 #### rrdtool
130 # rrdtool.binary = "/usr/bin/rrdtool"
131 # rrdtool.db-name = "/var/www/lighttpd.rrd"
132
133
134 #### variable usage:
135 ## variable name without "." is auto prefixed by "var." and becomes "var.bar"
136 #bar = 1
137 #var.mystring = "foo"
138
139 ## integer add
140 #bar += 1
141 ## string concat, with integer cast as string, result: "www.foo1.com"
142 #server.name = "www." + mystring + var.bar + ".com"
143 ## array merge
144 #index-file.names = (foo + ".php") + index-file.names
145 #index-file.names += (foo + ".php")
146
147
148 #### external configuration files
149 ## mimetype mapping
150 include_shell "/usr/share/lighttpd/create-mime.assign.pl"
151
152 ## load enabled configuration files,
153 ## read /etc/lighttpd/conf-available/README first
154 include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
155
156 #### handle Debian Policy Manual, Section 11.5. urls
157 ## by default allow them only from localhost
158 ## (This must come last due to #445459)
159 ## Note: =~ "127.0.0.1" works with ipv6 enabled, whereas == "127.0.0.1" doesn't
160 $HTTP["remoteip"] =~ "127.0.0.1" {
161         alias.url += (
162                 "/doc/" => "/usr/share/doc/",
163                 "/images/" => "/usr/share/images/"
164         )
165         $HTTP["url"] =~ "^/doc/|^/images/" {
166                 dir-listing.activate = "enable"
167         }
168 }
169
170 $HTTP["host"] == "hydroponie" {
171     server.server-root = "/var/www"
172     server.document-root = "/"
173
174     fastcgi.server = ( "/scripts/" =>
175         ((      "bin-path" => "/home/bohacekm/fel/X36BAP/hydroweb/src/hydroponie",
176             "socket" => "/tmp/hydro.socket",
177             "max-procs" => 1,
178             "check-local" => "disable",
179             "docroot" => "/scripts/" # remote server may use
180                              # it's own docroot
181         ))
182     )
183 }
184
185
186 #$HTTP["host"] == "threads" {
187 #    server.server-root = "/var/www"
188 #    server.document-root = "/"
189 #    
190 #    fastcgi.server = ( "/" =>
191 #        ((  "bin-path" => "/home/bohacekm/src/qt_lighttpd_test/fcgi_testapp",
192 #            "socket" => "/tmp/fcgi_testapp.socket",
193 #            "max-procs" => 10,
194 #            "check-local" => "disable",
195 #            "docroot" => "/" # remote server may use
196 #                            # it's own docroot
197 #        ))
198 #    )
199 #}
200                                                                                                              
201