X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/bc92e61b3b45e2e1e203d6992b9d69e76cd2c326..5cc8afd896ee2c8f138c955844cdca6e618a7efa:/config/lighttpd.conf?ds=sidebyside diff --git a/config/lighttpd.conf b/config/lighttpd.conf index 317413f57..74aa6f38f 100644 --- a/config/lighttpd.conf +++ b/config/lighttpd.conf @@ -7,6 +7,7 @@ server.modules = ( "mod_cgi", "mod_compress", "mod_evasive", + "mod_expire", "mod_fastcgi", "mod_redirect", "mod_status" @@ -31,10 +32,11 @@ server.errorlog = "/var/log/lighttpd/error.log" $HTTP["remoteip"] == "127.0.0.1" { status.status-url = "/server-status" } # -# API 0.3 is long dead, so fail any attempt to access it without +# Fail any attempt to access old versions of the API without # getting rails involved at all # $HTTP["url"] =~ "^/api/0.3/" { url.access-deny = ("") } +$HTTP["url"] =~ "^/api/0.4/" { url.access-deny = ("") } # # IP blocked at SteveC's request as it was trying to download the @@ -77,6 +79,17 @@ compress.filetype = ( "text/plain" ) +# +# Set expiry for static content +# +expire.url = ( + "/export/" => "access 7 days", + "/images/" => "access 10 years", + "/javascripts/" => "access 10 years", + "/openlayers/" => "access 7 days", + "/stylesheets/" => "access 10 years" +) + # # Cache compressed content #