2015-05-16 19:01:49 +08:00
|
|
|
server {
|
|
|
|
server_name cartodb.localhost *.cartodb.localhost;
|
|
|
|
|
2015-07-08 22:48:20 +08:00
|
|
|
client_max_body_size 100M;
|
|
|
|
|
2015-12-04 10:41:21 +08:00
|
|
|
location ~* /(user/.*/)?api/v1/maps {
|
2015-05-18 20:37:45 +08:00
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_pass http://127.0.0.1:3000;
|
|
|
|
}
|
|
|
|
|
2015-12-04 10:41:21 +08:00
|
|
|
location ~* /(user/.*/)?api/v1/map {
|
2015-05-16 19:01:49 +08:00
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_pass http://127.0.0.1:8181;
|
|
|
|
}
|
|
|
|
|
2015-12-04 10:41:21 +08:00
|
|
|
location ~* /(user/.*)?/api/v2/sql {
|
|
|
|
# RedHog: Hack to work around bug in cartodb local hosting but using cdn for js libs
|
|
|
|
rewrite /(user/.*)?/api/v2/sql(.*) /$1/api/v2/sql$2 break;
|
2015-05-16 19:01:49 +08:00
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_pass http://127.0.0.1:8080;
|
|
|
|
}
|
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_pass http://127.0.0.1:3000;
|
|
|
|
}
|
|
|
|
|
|
|
|
error_log /var/log/nginx/cartodb_error.log;
|
|
|
|
access_log /var/log/nginx/cartodb_access.log;
|
|
|
|
}
|