X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/1cacff9500260978db282eff582dac01e58d765c..c1dc2410c3f88f2a0e05110585ac12c94796a60e:/config/lighttpd.conf diff --git a/config/lighttpd.conf b/config/lighttpd.conf index 6dca6bd57..7395a4b08 100644 --- a/config/lighttpd.conf +++ b/config/lighttpd.conf @@ -7,6 +7,7 @@ server.modules = ( "mod_compress", "mod_evasive", "mod_fastcgi", + "mod_redirect", "mod_status" ) @@ -40,6 +41,12 @@ $HTTP["url"] =~ "^/api/0.3/" { url.access-deny = ("") } # $HTTP["remoteip"] == "143.210.16.160" { url.access-deny = ("") } +# +# Rule to block tilesAtHome when somebody decides to queue vast +# number of tiles for rerendering +# +#$HTTP["useragent"] == "tilesAtHome" { url.access-deny = ("") } + # # Limit connections to 20 per IP address # @@ -58,6 +65,30 @@ mimetype.assign = ( ".txt" => "text/plain" ) +# +# Enable compression of appropriate static content +# +compress.filetype = ( + "application/x-javascript", + "application/x-shockwave-flash", + "text/css", + "text/html", + "text/plain" +) + +# +# Cache compressed content +# +compress.cache-dir = "/var/cache/lighttpd" + +# +# Redirect trac and wiki requests to the right places +# +url.redirect = ( + "^/trac/(.*)$" => "http://trac.openstreetmap.org/$1", + "^/wiki/(.*)$" => "http://wiki.openstreetmap.org/$1" +) + # # Serve static content from the rails public area ourselves #