| 1 |
server.modules = ( |
|---|
| 2 |
"mod_access", |
|---|
| 3 |
"mod_auth", |
|---|
| 4 |
"mod_status", |
|---|
| 5 |
# "mod_fastcgi", |
|---|
| 6 |
# "mod_proxy", |
|---|
| 7 |
# "mod_userdir", |
|---|
| 8 |
"mod_accesslog" ) |
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
server.document-root = "/home/Backup" |
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
## where to send error-messages to |
|---|
| 15 |
server.errorlog = "/home/Backup/log/lighttpd/backup_error.log" |
|---|
| 16 |
|
|---|
| 17 |
# files to check for if .../ is requested |
|---|
| 18 |
#index-file.names = ( "index.php", "index.html", |
|---|
| 19 |
# "index.htm", "default.htm" ) |
|---|
| 20 |
|
|---|
| 21 |
# mimetype mapping |
|---|
| 22 |
mimetype.assign = ( |
|---|
| 23 |
".pdf" => "application/pdf", |
|---|
| 24 |
".sig" => "application/pgp-signature", |
|---|
| 25 |
".spl" => "application/futuresplash", |
|---|
| 26 |
".class" => "application/octet-stream", |
|---|
| 27 |
".ps" => "application/postscript", |
|---|
| 28 |
".torrent" => "application/x-bittorrent", |
|---|
| 29 |
".dvi" => "application/x-dvi", |
|---|
| 30 |
".gz" => "application/x-gzip", |
|---|
| 31 |
".pac" => "application/x-ns-proxy-autoconfig", |
|---|
| 32 |
".swf" => "application/x-shockwave-flash", |
|---|
| 33 |
".tar.gz" => "application/x-tgz", |
|---|
| 34 |
".tgz" => "application/x-tgz", |
|---|
| 35 |
".tar" => "application/x-tar", |
|---|
| 36 |
".zip" => "application/zip", |
|---|
| 37 |
".mp3" => "audio/mpeg", |
|---|
| 38 |
".m3u" => "audio/x-mpegurl", |
|---|
| 39 |
".wma" => "audio/x-ms-wma", |
|---|
| 40 |
".wax" => "audio/x-ms-wax", |
|---|
| 41 |
".ogg" => "application/ogg", |
|---|
| 42 |
".wav" => "audio/x-wav", |
|---|
| 43 |
".gif" => "image/gif", |
|---|
| 44 |
".jpg" => "image/jpeg", |
|---|
| 45 |
".jpeg" => "image/jpeg", |
|---|
| 46 |
".png" => "image/png", |
|---|
| 47 |
".xbm" => "image/x-xbitmap", |
|---|
| 48 |
".xpm" => "image/x-xpixmap", |
|---|
| 49 |
".xwd" => "image/x-xwindowdump", |
|---|
| 50 |
".css" => "text/css", |
|---|
| 51 |
".html" => "text/html", |
|---|
| 52 |
".htm" => "text/html", |
|---|
| 53 |
".js" => "text/javascript", |
|---|
| 54 |
|
|---|
| 55 |
".asc" => "text/plain", |
|---|
| 56 |
".rb" => "text/plain", |
|---|
| 57 |
".sh" => "text/plain", |
|---|
| 58 |
".c" => "text/plain", |
|---|
| 59 |
".cpp" => "text/plain", |
|---|
| 60 |
".log" => "text/plain", |
|---|
| 61 |
".conf" => "text/plain", |
|---|
| 62 |
".text" => "text/plain", |
|---|
| 63 |
".txt" => "text/plain", |
|---|
| 64 |
".dtd" => "text/xml", |
|---|
| 65 |
".xml" => "text/xml", |
|---|
| 66 |
|
|---|
| 67 |
".mpeg" => "video/mpeg", |
|---|
| 68 |
".mpg" => "video/mpeg", |
|---|
| 69 |
".mov" => "video/quicktime", |
|---|
| 70 |
".qt" => "video/quicktime", |
|---|
| 71 |
".avi" => "video/x-msvideo", |
|---|
| 72 |
".asf" => "video/x-ms-asf", |
|---|
| 73 |
".asx" => "video/x-ms-asf", |
|---|
| 74 |
".wmv" => "video/x-ms-wmv", |
|---|
| 75 |
".bz2" => "application/x-bzip", |
|---|
| 76 |
".tbz" => "application/x-bzip-compressed-tar", |
|---|
| 77 |
".tar.bz2" => "application/x-bzip-compressed-tar", |
|---|
| 78 |
# default mime type |
|---|
| 79 |
"" => "text/plain", |
|---|
| 80 |
) |
|---|
| 81 |
|
|---|
| 82 |
# Use the "Content-Type" extended attribute to obtain mime type if possible |
|---|
| 83 |
mimetype.use-xattr = "enable" |
|---|
| 84 |
|
|---|
| 85 |
|
|---|
| 86 |
#### accesslog module |
|---|
| 87 |
accesslog.filename = "/home/Backup/log/lighttpd/backup_access.log" |
|---|
| 88 |
|
|---|
| 89 |
## deny access the file-extensions |
|---|
| 90 |
# |
|---|
| 91 |
# ~ is for backupfiles from vi, emacs, joe, ... |
|---|
| 92 |
# .inc is often used for code includes which should in general not be part |
|---|
| 93 |
# of the document-root |
|---|
| 94 |
url.access-deny = ( "~", ".inc", ".currently_building" ) |
|---|
| 95 |
|
|---|
| 96 |
$HTTP["url"] =~ "\.pdf$" { |
|---|
| 97 |
server.range-requests = "disable" |
|---|
| 98 |
} |
|---|
| 99 |
|
|---|
| 100 |
## |
|---|
| 101 |
# which extensions should not be handle via static-file transfer |
|---|
| 102 |
# |
|---|
| 103 |
# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi |
|---|
| 104 |
#static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) |
|---|
| 105 |
|
|---|
| 106 |
|
|---|
| 107 |
## bind to port (default: 80) |
|---|
| 108 |
#server.port = 81 |
|---|
| 109 |
|
|---|
| 110 |
## bind to localhost (default: all interfaces) |
|---|
| 111 |
#server.bind = "127.0.0.1" |
|---|
| 112 |
|
|---|
| 113 |
|
|---|
| 114 |
## NOTICE: This script is intendent to be started by the Administrator user |
|---|
| 115 |
## and it will downgrade proccess uid to Backup during startup |
|---|
| 116 |
server.pid-file = "/home/Administrator/run/lighttpd_backup.pid" |
|---|
| 117 |
|
|---|
| 118 |
|
|---|
| 119 |
## virtual directory listings |
|---|
| 120 |
dir-listing.activate = "enable" |
|---|
| 121 |
dir-listing.show-header = "enable" |
|---|
| 122 |
dir-listing.show-readme = "enable" |
|---|
| 123 |
dir-listing.set-footer = "University of California<br/>Genomics Institute" |
|---|
| 124 |
|
|---|
| 125 |
dir-listing.hide-dotfiles = "enable" |
|---|
| 126 |
|
|---|
| 127 |
|
|---|
| 128 |
## enable debugging |
|---|
| 129 |
#debug.log-request-header = "enable" |
|---|
| 130 |
#debug.log-response-header = "enable" |
|---|
| 131 |
#debug.log-request-handling = "enable" |
|---|
| 132 |
#debug.log-file-not-found = "enable" |
|---|
| 133 |
|
|---|
| 134 |
### only root can use these options |
|---|
| 135 |
# |
|---|
| 136 |
# chroot() to directory (default: no chroot() ) |
|---|
| 137 |
#server.chroot = "/" |
|---|
| 138 |
|
|---|
| 139 |
## change uid and gid of the lighttpd process |
|---|
| 140 |
server.username = "Backup" |
|---|
| 141 |
server.groupname = "None" |
|---|
| 142 |
|
|---|
| 143 |
|
|---|
| 144 |
#### proxy module |
|---|
| 145 |
## read proxy.txt for more info |
|---|
| 146 |
#proxy.server = ( ".php" => |
|---|
| 147 |
# ( "localhost" => |
|---|
| 148 |
# ( |
|---|
| 149 |
# "host" => "192.168.0.101", |
|---|
| 150 |
# "port" => 80 |
|---|
| 151 |
# ) |
|---|
| 152 |
# ) |
|---|
| 153 |
# ) |
|---|
| 154 |
|
|---|
| 155 |
|
|---|
| 156 |
|
|---|
| 157 |
|
|---|
| 158 |
|
|---|
| 159 |
#### status module |
|---|
| 160 |
status.status-url = "/log/lighttpd/server-status" |
|---|
| 161 |
status.config-url = "/log/lighttpd/server-config" |
|---|
| 162 |
|
|---|
| 163 |
|
|---|
| 164 |
|
|---|
| 165 |
#### auth module |
|---|
| 166 |
|
|---|
| 167 |
## read authentication.txt for more info |
|---|
| 168 |
auth.backend = "htdigest" |
|---|
| 169 |
auth.backend.htdigest.userfile = "/etc/lighttpd/htdigest.user" |
|---|
| 170 |
|
|---|
| 171 |
|
|---|
| 172 |
# White List is |
|---|
| 173 |
# Root (without /), Root (with /), or Any file in root : |
|---|
| 174 |
# (See the last "Everithing Else" statement) |
|---|
| 175 |
|
|---|
| 176 |
$HTTP["url"] == "/Ftp Server Replacement/" { |
|---|
| 177 |
# allow |
|---|
| 178 |
|
|---|
| 179 |
#auth.require = ( "" => |
|---|
| 180 |
# ( |
|---|
| 181 |
# "method" => "digest", |
|---|
| 182 |
# "realm" => "the Genomics Institute", |
|---|
| 183 |
# "require" => "valid-user" |
|---|
| 184 |
# ) |
|---|
| 185 |
# ) |
|---|
| 186 |
} |
|---|
| 187 |
|
|---|
| 188 |
else $HTTP["url"] == "/Ftp Server Replacement/IIGB_Data/" { |
|---|
| 189 |
# allow |
|---|
| 190 |
|
|---|
| 191 |
# auth.require = ( "" => |
|---|
| 192 |
# ( |
|---|
| 193 |
# "method" => "digest", |
|---|
| 194 |
# "realm" => "the Genomics Institute", |
|---|
| 195 |
# "require" => "valid-user" |
|---|
| 196 |
# ) |
|---|
| 197 |
# ) |
|---|
| 198 |
} |
|---|
| 199 |
|
|---|
| 200 |
else $HTTP["url"] == "/Ftp Server Replacement/IIGB_Data/ABI/" { |
|---|
| 201 |
# allow |
|---|
| 202 |
|
|---|
| 203 |
# auth.require = ( "" => |
|---|
| 204 |
# ( |
|---|
| 205 |
# "method" => "digest", |
|---|
| 206 |
# "realm" => "the Genomics Institute", |
|---|
| 207 |
# "require" => "valid-user" |
|---|
| 208 |
# ) |
|---|
| 209 |
# ) |
|---|
| 210 |
# |
|---|
| 211 |
} |
|---|
| 212 |
|
|---|
| 213 |
else $HTTP["url"] == "/Ftp Server Replacement/IIGB_Data/ABI/UCR_Users/" { |
|---|
| 214 |
# allow |
|---|
| 215 |
|
|---|
| 216 |
# auth.require = ( "" => |
|---|
| 217 |
# ( |
|---|
| 218 |
# "method" => "digest", |
|---|
| 219 |
# "realm" => "the Genomics Institute", |
|---|
| 220 |
# "require" => "valid-user" |
|---|
| 221 |
# ) |
|---|
| 222 |
# ) |
|---|
| 223 |
# |
|---|
| 224 |
} |
|---|
| 225 |
|
|---|
| 226 |
else $HTTP["url"] == "/Ftp Server Replacement/IIGB_Data/ABI/External_Users/" { |
|---|
| 227 |
# allow |
|---|
| 228 |
|
|---|
| 229 |
# auth.require = ( "" => |
|---|
| 230 |
# ( |
|---|
| 231 |
# "method" => "digest", |
|---|
| 232 |
# "realm" => "the Genomics Institute", |
|---|
| 233 |
# "require" => "valid-user" |
|---|
| 234 |
# ) |
|---|
| 235 |
# ) |
|---|
| 236 |
# |
|---|
| 237 |
} |
|---|
| 238 |
|
|---|
| 239 |
|
|---|
| 240 |
# |
|---|
| 241 |
# UCR Users |
|---|
| 242 |
# |
|---|
| 243 |
|
|---|
| 244 |
else $HTTP["url"] =~ "/Ftp Server Replacement/IIGB_Data/ABI/UCR_Users/.+" { |
|---|
| 245 |
include "ucr_users.conf" |
|---|
| 246 |
} |
|---|
| 247 |
|
|---|
| 248 |
|
|---|
| 249 |
|
|---|
| 250 |
# |
|---|
| 251 |
# Exteranl Users |
|---|
| 252 |
# |
|---|
| 253 |
|
|---|
| 254 |
else $HTTP["url"] =~ "/Ftp Server Replacement/IIGB_Data/ABI/External_Users/.+" { |
|---|
| 255 |
include "external_users.conf" |
|---|
| 256 |
} |
|---|
| 257 |
|
|---|
| 258 |
|
|---|
| 259 |
|
|---|
| 260 |
# |
|---|
| 261 |
# Everithing Else |
|---|
| 262 |
# |
|---|
| 263 |
|
|---|
| 264 |
else $HTTP["url"] !~ "^$|^/$" { |
|---|
| 265 |
auth.require = ( "" => |
|---|
| 266 |
( |
|---|
| 267 |
"method" => "digest", |
|---|
| 268 |
"realm" => "the Genomics Institute", |
|---|
| 269 |
"require" => "user=root" |
|---|
| 270 |
) |
|---|
| 271 |
) |
|---|
| 272 |
} |
|---|
| 273 |
|
|---|
| 274 |
|
|---|
| 275 |
|
|---|
| 276 |
#### SSL engine |
|---|
| 277 |
#ssl.engine = "enable" |
|---|
| 278 |
#ssl.pemfile = "/etc/ssl/private/lighttpd.pem" |
|---|