From f9f5856d2bc1e4cad95aba8248fe119a7081dbbb Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 20 Apr 2009 15:16:38 +0000 Subject: [PATCH] Rewrite /0.n/... as /api/0.n/... for the api virtual host. --- config/nginx.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/nginx.conf b/config/nginx.conf index af43ed2a2..745fa555e 100644 --- a/config/nginx.conf +++ b/config/nginx.conf @@ -110,6 +110,10 @@ http { index index.html; access_log /var/log/nginx/openstreetmap.org.access.log; + if ($host ~* api\.(.*)) { + rewrite ^/(0\.[0-9]+)/(.*)$ /api/$1/$2 + } + location / { deny 143.210.16.160; allow all; @@ -118,6 +122,7 @@ http { location /trac/ { rewrite ^/trac/(.*)$ http://trac.openstreetmap.org/$1 permanent; } + location /wiki/ { rewrite ^/wiki/(.*)$ http://wiki.openstreetmap.org/$1 permanent; } -- 2.43.2