]> git.openstreetmap.org Git - rails.git/blobdiff - config/lighttpd.conf
Stop trying to report on the number of ways with tags because (a) almost all
[rails.git] / config / lighttpd.conf
index 0a6840e4bb0720d3a8e9e7f27caab9ec159a8c80..5455e266d8b880f5251a225bc6fef3a29b5cf1bc 100644 (file)
@@ -4,8 +4,10 @@
 server.modules = ( 
   "mod_access",
   "mod_accesslog",
+  "mod_cgi",
   "mod_compress",
   "mod_evasive",
+  "mod_expire",
   "mod_fastcgi",
   "mod_redirect",
   "mod_status"
@@ -30,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
@@ -76,15 +79,33 @@ compress.filetype = (
   "text/plain"
 )
 
+#
+# Set expiry for static content
+#
+expire.url = (
+  "/images/" => "access 10 years",
+  "/javascripts/" => "access 10 years",
+  "/openlayers/" => "access 10 years",
+  "/stylesheets/" => "access 10 years"
+)
+
 #
 # Cache compressed content
 #
 compress.cache-dir = "/var/cache/lighttpd"
 
 #
-# Redirect wiki requests to the wiki
+# Redirect trac and wiki requests to the right places
+#
+url.redirect = ( 
+  "^/trac/(.*)$" => "http://trac.openstreetmap.org/$1",
+  "^/wiki/(.*)$" => "http://wiki.openstreetmap.org/$1"
+)
+
+#
+# Run anything with a .pl iextension as a CGI script
 #
-url.redirect = ( "^/wiki/(.*)$" => "http://wiki.openstreetmap.org/$1" )
+cgi.assign = ( ".pl" => "/usr/bin/perl" )
 
 #
 # Serve static content from the rails public area ourselves