server.modules = ( "mod_access", "mod_auth", "mod_alias", "mod_compress", "mod_accesslog", "mod_fastcgi", "mod_setenv", # "mod_rewrite", # "mod_redirect", "mod_proxy", "mod_status", ) server.document-root = "/var/www/html" server.upload-dirs = ( "/var/cache/lighttpd/uploads" ) server.errorlog = "/var/log/lighttpd/error.log" server.pid-file = "/var/run/lighttpd.pid" server.username = "www-data" server.groupname = "www-data" server.port = 80 #setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" ) # CORS Headers setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*", "Access-Control-Allow-Credentials" => "true", "Access-Control-Allow-Headers" => "accept, origin, x-requested-with, content-type, x-transmission-session-id", "Access-Control-Expose-Headers" => "X-Transmission-Session-Id", "X-Proxy" => "www-02", "Access-Control-Allow-Methods" => "GET, PUT, POST, HEAD, DELETE, OPTIONS" ) # strict parsing and normalization of URL for consistency and security # https://redmine.lighttpd.net/projects/lighttpd/wiki/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 ) index-file.names = ( "index.php", "index.html", "index.lighttpd.html" ) url.access-deny = ( "~", ".inc" ) static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) compress.cache-dir = "/var/cache/lighttpd/compress/" compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" ) # default listening port for IPv6 falls back to the IPv4 port ## Use ipv6 if available #include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port include_shell "/usr/share/lighttpd/create-mime.assign.pl" include_shell "/usr/share/lighttpd/include-conf-enabled.pl"