4 error_log /var/log/nginx/error.log;
\r
5 pid /var/run/nginx.pid;
\r
8 worker_connections 1024;
\r
12 include /etc/nginx/mime.types;
\r
13 default_type application/octet-stream;
\r
15 #access_log /var/log/nginx/access.log;
\r
20 #keepalive_timeout 0;
\r
21 keepalive_timeout 65;
\r
25 gzip_min_length 1100;
\r
27 # text/html is added gzip_types by default
\r
28 gzip_types text/plain application/x-javascript application/x-shockwave-flash text/css;
\r
29 #NO CGI SUPPORT IN NGINX fix stat .pl later
\r
31 upstream web_backend {
\r
32 server 127.0.0.1:8000;
\r
33 server 127.0.0.1:8001;
\r
34 server 127.0.0.1:8002;
\r
35 server 127.0.0.1:8003;
\r
36 server 127.0.0.1:8004;
\r
37 server 127.0.0.1:8005;
\r
38 server 127.0.0.1:8006;
\r
39 server 127.0.0.1:8007;
\r
40 server 127.0.0.1:8008;
\r
41 server 127.0.0.1:8009;
\r
42 server 127.0.0.1:8010;
\r
43 server 127.0.0.1:8011;
\r
44 server 127.0.0.1:8012;
\r
45 server 127.0.0.1:8013;
\r
46 server 127.0.0.1:8014;
\r
47 server 127.0.0.1:8015;
\r
48 server 127.0.0.1:8016;
\r
49 server 127.0.0.1:8017;
\r
50 server 127.0.0.1:8018;
\r
51 server 127.0.0.1:8019;
\r
52 server 127.0.0.1:8020;
\r
53 server 127.0.0.1:8021;
\r
54 server 127.0.0.1:8022;
\r
55 server 127.0.0.1:8023;
\r
56 server 127.0.0.1:8024;
\r
57 server 127.0.0.1:8025;
\r
58 server 127.0.0.1:8026;
\r
59 server 127.0.0.1:8027;
\r
60 server 127.0.0.1:8028;
\r
61 server 127.0.0.1:8029;
\r
64 upstream api_backend {
\r
65 server 127.0.0.1:8030;
\r
66 server 127.0.0.1:8031;
\r
67 server 127.0.0.1:8032;
\r
68 server 127.0.0.1:8033;
\r
69 server 127.0.0.1:8034;
\r
70 server 127.0.0.1:8035;
\r
71 server 127.0.0.1:8036;
\r
72 server 127.0.0.1:8037;
\r
73 server 127.0.0.1:8038;
\r
74 server 127.0.0.1:8039;
\r
75 server 127.0.0.1:8040;
\r
76 server 127.0.0.1:8041;
\r
77 server 127.0.0.1:8042;
\r
78 server 127.0.0.1:8043;
\r
79 server 127.0.0.1:8044;
\r
82 upstream bulkapi_backend {
\r
83 server 10.0.0.10:8000;
\r
84 server 10.0.0.11:8000;
\r
85 server 10.0.0.12:8000;
\r
86 server 10.0.0.10:8001;
\r
87 server 10.0.0.11:8001;
\r
88 server 10.0.0.12:8001;
\r
89 server 10.0.0.10:8002;
\r
90 server 10.0.0.11:8002;
\r
91 server 10.0.0.12:8002;
\r
92 server 10.0.0.10:8003;
\r
93 server 10.0.0.11:8003;
\r
94 server 10.0.0.12:8003;
\r
97 upstream tah_backend {
\r
98 server 10.0.0.10:8004;
\r
99 server 10.0.0.11:8004;
\r
100 server 10.0.0.12:8004;
\r
101 server 10.0.0.10:8005;
\r
102 server 10.0.0.11:8005;
\r
103 server 10.0.0.12:8005;
\r
108 server_name .openstreetmap.org api.openstreetmap.org;
\r
109 root /home/rails/public;
\r
111 access_log /var/log/nginx/openstreetmap.org.access.log;
\r
113 if ($host ~* api\.(.*)) {
\r
114 rewrite ^/(0\.[0-9]+)/(.*)$ /api/$1/$2
\r
118 deny 143.210.16.160;
\r
123 rewrite ^/trac/(.*)$ http://trac.openstreetmap.org/$1 permanent;
\r
127 rewrite ^/wiki/(.*)$ http://wiki.openstreetmap.org/$1 permanent;
\r
131 include /etc/nginx/fastcgi_params;
\r
132 if ($http_user_agent = "tilesAtHome") {
\r
133 fastcgi_pass tah_backend;
\r
138 location ~ ^/api/0\.6/(map|trackpoints|amf|amf/read|swf/trackpoints)$ {
\r
139 include /etc/nginx/fastcgi_params;
\r
140 fastcgi_pass bulkapi_backend;
\r
144 location ~ ^/api/0\.6/.*/search$ {
\r
145 include /etc/nginx/fastcgi_params;
\r
146 fastcgi_pass bulkapi_backend;
\r
150 location ~ ^/api/0\.6/ {
\r
151 include /etc/nginx/fastcgi_params;
\r
152 fastcgi_pass api_backend;
\r
156 location ~ ^/api/0\.[0-9]+/ {
\r
161 include /etc/nginx/fastcgi_params;
\r
162 if (!-f $request_filename) {
\r
163 fastcgi_pass web_backend;
\r
168 location /crossdomain.xml {
\r
169 default_type text/x-cross-domain-policy;
\r
172 #error_page 404 /404.html;
\r
173 # redirect server error pages to the static page /50x.html
\r
174 error_page 500 502 503 504 /50x.html;
\r
175 location = /50x.html {
\r
176 root /var/www/nginx-default;
\r