]> git.openstreetmap.org Git - rails.git/blobdiff - config/lighttpd.conf
Use "confirm_email" instead "confirm email" in resource names so it
[rails.git] / config / lighttpd.conf
index 98f914cc96b8f8ce46e058a25d81dd7a3f14e2a6..80b941fa6814a98f5dab3d9b72e9804fe3068e65 100644 (file)
@@ -20,6 +20,8 @@ server.username = "www-data"
 server.groupname = "www-data"
 server.pid-file = "/var/run/lighttpd.pid"
 
+server.max-fds = 8192
+
 #
 # Setup logging
 #
@@ -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
 #