X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/1f8a68371ad34594cce4aadf5fef229588fd4ddc..1a1a3f4a00484acd5de7e86556a331f33a67ee07:/config/lighttpd.conf diff --git a/config/lighttpd.conf b/config/lighttpd.conf index 419f25e32..c1537edef 100644 --- a/config/lighttpd.conf +++ b/config/lighttpd.conf @@ -19,6 +19,8 @@ server.modules = ( server.username = "www-data" server.groupname = "www-data" server.pid-file = "/var/run/lighttpd.pid" +server.max-fds = 8192 +server.reject-expect-100-with-417 = "disable" # # Setup logging @@ -88,7 +90,7 @@ compress.filetype = ( # Set expiry for static content # expire.url = ( - "/export/" => "access 7 days", + "/export/embed.html" => "access 7 days", "/images/" => "access 10 years", "/javascripts/" => "access 10 years", "/openlayers/" => "access 7 days", @@ -108,6 +110,19 @@ url.redirect = ( "^/wiki/(.*)$" => "http://wiki.openstreetmap.org/$1" ) +# +# Redirect everything except www.openstreetmap.org and +# api.openstreetmap.org to www.openstreetmap.org +# +$HTTP["host"] =~ "^api\." { + $HTTP["host"] != "api.openstreetmap.org" { + url.redirect = ( "^(.*)$" => "http://api.openstreetmap.org$1" ) + } +} +else $HTTP["host"] != "www.openstreetmap.org" { + url.redirect = ( "^(.*)$" => "http://www.openstreetmap.org$1" ) +} + # # Run anything with a .pl iextension as a CGI script # @@ -124,13 +139,13 @@ server.document-root = "/home/rails/public" $HTTP["useragent"] == "tilesAtHome" { server.error-handler-404 = "/dispatch.tah" } -else $HTTP["url"] =~ "^/api/0\.5/(map|trackpoints|amf|amf/read|swf/trackpoints)$" { +else $HTTP["url"] =~ "^/api/0\.6/(map|trackpoints|amf|amf/read|swf/trackpoints)$" { server.error-handler-404 = "/dispatch.bulkapi" } -else $HTTP["url"] =~ "^/api/0\.5/.*/search$" { +else $HTTP["url"] =~ "^/api/0\.6/.*/search$" { server.error-handler-404 = "/dispatch.bulkapi" } -else $HTTP["url"] =~ "^/api/0\.5/" { +else $HTTP["url"] =~ "^/api/0\.6/" { server.error-handler-404 = "/dispatch.api" } else $HTTP["url"] =~ "^/api/0\.[0-9]+/" {