X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/753e45060473045dcecbff4910d61e747862f6b5..39e77df344c1461f37f3b413a775a61d2a4ac772:/config/lighttpd.conf diff --git a/config/lighttpd.conf b/config/lighttpd.conf index 9e859b2e0..75647f248 100644 --- a/config/lighttpd.conf +++ b/config/lighttpd.conf @@ -4,6 +4,7 @@ server.modules = ( "mod_access", "mod_accesslog", + "mod_cgi", "mod_compress", "mod_evasive", "mod_fastcgi", @@ -30,10 +31,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 @@ -82,9 +84,17 @@ compress.filetype = ( compress.cache-dir = "/var/cache/lighttpd" # -# Redirect wiki requests to the wiki +# Redirect trac and wiki requests to the right places # -url.redirect = ( "^/wiki/(.*)$" => "http://wiki.openstreetmap.org/wiki/$1" ) +url.redirect = ( + "^/trac/(.*)$" => "http://trac.openstreetmap.org/$1", + "^/wiki/(.*)$" => "http://wiki.openstreetmap.org/$1" +) + +# +# Run anything with a .pl iextension as a CGI script +# +cgi.assign = ( ".pl" => "/usr/bin/perl" ) # # Serve static content from the rails public area ourselves