# Quelques définitions de variables pour se faciliter la vie. var.basedir = server.document-root var.confdir = "/etc/lighttpd" var.logroot = "/var/log/lighttpd" var.dokudir = "doc" etag.use-inode = "enable" etag.use-mtime = "enable" etag.use-size = "enable" static-file.etags = "enable" # Pour éviter les erreurs 417 server.reject-expect-100-with-417 = "disable" # sécurisation # interdiction d'accès aux fichiers .htaccess $HTTP["url"] =~ "/(\.|_)ht" { url.access-deny = ( "" ) } # Sécurisation de dokuwiki # domaine doc.* : $HTTP["host"] =~ "(^" + dokudir + "\.)" { $HTTP["url"] =~ "^/(bin|data|inc|conf)/" { url.access-deny = ( "" ) } } # domaine */doc : $HTTP["url"] =~ "^/" + dokudir + "/(data|conf|bin|inc)/+.*" { url.access-deny = ("") } # Format du log : accesslog.format = "%h %V %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" # module expire : date limite 7 jours $HTTP["url"] =~ "\.(jpg|gif|png|css|js|svg)$" { expire.url = ( "" => "access 7 days" ) } # module compress compress.filetype += ("text/xml","application/x-javascript", , "application/javascript", "text/javascript", "text/x-js", "text/css", "text/html", "text/plain", "image/png", "image/gif", "image/jpg", "image/svg+xml", "application/xml") # module awstats alias.url += ( "/icon/" => "/var/www/awstats/wwwroot/icon/" ) alias.url += ( "/stat" => "/var/www/awstats/wwwroot/cgi-bin/" ) $HTTP["url"] =~ "^/stat($|/)" { # Pour que http://.../stat/ renvoie sur http://.../stats/awstats.pl index-file.names = ("awstats.pl") # perl et cgi cgi.assign = ( ".pl" => "/usr/bin/perl", ".cgi" => "/usr/bin/perl" ) } # module WebDAV alias.url += ( "/webdav" => "/var/www" )