# Sample Bird's Eye Lighttpd config - just added a small amount to # the standard Lighttpd configuration. server.modules = ( "mod_indexfile", "mod_access", "mod_alias", "mod_redirect", "mod_rewrite", ) server.document-root = "/srv/birdseye/public" server.upload-dirs = ( "/var/cache/lighttpd/uploads" ) server.errorlog = "/var/log/lighttpd/error.log" server.pid-file = "/run/lighttpd.pid" server.username = "www-data" server.groupname = "www-data" server.port = 80 # server.bind = "192.0.2.78" # strict parsing and normalization of URL for consistency and security # https://wiki.lighttpd.net/Server_http-parseoptsDetails # (might need to explicitly set "url-path-2f-decode" = "disable" # if a specific application is encoding URLs inside url-path) server.http-parseopts = ( "header-strict" => "enable",# default "host-strict" => "enable",# default "host-normalize" => "enable",# default "url-normalize-unreserved"=> "enable",# recommended highly "url-normalize-required" => "enable",# recommended "url-ctrls-reject" => "enable",# recommended "url-path-2f-decode" => "enable",# recommended highly (unless breaks app) #"url-path-2f-reject" => "enable", "url-path-dotseg-remove" => "enable",# recommended highly (unless breaks app) #"url-path-dotseg-reject" => "enable", #"url-query-20-plus" => "enable",# consistency in query string "url-invalid-utf8-reject" => "enable",# recommended highly (unless breaks app) ) index-file.names = ( "index.php", "index.html" ) url.access-deny = ( "~", ".inc" ) static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) include_shell "/usr/share/lighttpd/create-mime.conf.pl" include "/etc/lighttpd/conf-enabled/*.conf" # default listening port for IPv6 is same as default IPv4 port include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port ### Customizations # customizations should generally be placed in separate files such as # /etc/lighttpd/conf-available/00_vars.conf # override variables for *.conf # /etc/lighttpd/conf-available/99_custom.conf # override *.conf settings # and then enabled using lighty-enable-mod (1) url.redirect = () url.rewrite-once = ( "^/(css|img|js|fonts)/.*\.(jpg|jpeg|gif|png|swf|avi|mpg|mpeg|mp3|flv|ico|css|js|woff|ttf)$" => "$0", "^/(favicon\.ico|robots\.txt|sitemap\.xml)$" => "$0", "^/test\.php$" => "$0", "^/[^\?]*(\?.*)?$" => "/index.php/$1" )